aboutsummaryrefslogtreecommitdiff
path: root/gdb/record-btrace.h
diff options
context:
space:
mode:
authorTim Wiederhake <tim.wiederhake@intel.com>2016-07-25 10:57:06 +0200
committerTim Wiederhake <tim.wiederhake@intel.com>2016-07-25 11:03:43 +0200
commitc0272db5854a799a9f3bb3803c3d03d1a62b9ac2 (patch)
treeebd295aa3734c916316b96ed8a1481e5d13c6c39 /gdb/record-btrace.h
parent95804507f2645c1cce29f2e1a33031accaa6aa24 (diff)
btrace: Resume recording after disconnect.
This patch allows gdbserver to continue recording after disconnect. On reconnect, the recorded data is accessible to gdb as if no disconnect happened. A possible application for this feature is remotely examine bugs that occur at irregular intervals, where maintaining a gdb connection is inconvenient. This also fixes the issue mentioned here: https://sourceware.org/ml/gdb-patches/2015-11/msg00424.html Signed-off-by: Tim Wiederhake <tim.wiederhake@intel.com> gdb/ChangeLog: * NEWS: Resume btrace on reconnect. * record-btrace.c: Added record-btrace.h include. (record_btrace_open): Split into this and ... (record_btrace_push_target): ... this. (record_btrace_disconnect): New function. (init_record_btrace_ops): Use record_btrace_disconnect. * record-btrace.h: New file. * remote.c: Added record-btrace.h include. (remote_start_remote): Check recording status. (remote_btrace_maybe_reopen): New function. gdb/doc/ChangeLog: * gdb.texinfo: Resume btrace on reconnect. gdb/testsuite/ChangeLog: * gdb.btrace/reconnect.c: New file. * gdb.btrace/reconnect.exp: New file. Change-Id: I95e8b0ab8a89e58591aba0e63818cee82fd211bc
Diffstat (limited to 'gdb/record-btrace.h')
-rw-r--r--gdb/record-btrace.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/gdb/record-btrace.h b/gdb/record-btrace.h
new file mode 100644
index 0000000000..d2062b8cde
--- /dev/null
+++ b/gdb/record-btrace.h
@@ -0,0 +1,28 @@
+/* Branch trace support for GDB, the GNU debugger.
+
+ Copyright (C) 2016 Free Software Foundation, Inc.
+
+ Contributed by Intel Corp. <tim.wiederhake@intel.com>
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef RECORD_BTRACE_H
+#define RECORD_BTRACE_H
+
+/* Push the record_btrace target. */
+extern void record_btrace_push_target (void);
+
+#endif /* RECORD_BTRACE_H */