aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.h
diff options
context:
space:
mode:
authorTim Wiederhake <tim.wiederhake@intel.com>2016-12-13 11:24:56 +0100
committerTim Wiederhake <tim.wiederhake@intel.com>2017-02-14 10:57:56 +0100
commitb158a20f26f1d226088122e8c4fa5a23bb893a48 (patch)
tree8a7d017304027dce8495465ab478e9effb499d23 /gdb/target.h
parent45b196c59065cd2c5b750b78a0329d42f6e924b1 (diff)
downloadgdb-b158a20f26f1d226088122e8c4fa5a23bb893a48.zip
gdb-b158a20f26f1d226088122e8c4fa5a23bb893a48.tar.gz
gdb-b158a20f26f1d226088122e8c4fa5a23bb893a48.tar.bz2
Add method to query current recording method to target_ops.
Signed-off-by: Tim Wiederhake <tim.wiederhake@intel.com> gdb/ChangeLog * record-btrace.c (record_btrace_record_method): New function. (init_record_btrace_ops): Initialize to_record_method. * record-full.c (record_full_record_method): New function. (init_record_full_ops, init_record_full_core_ops): Add record_full_record_method. * record.h (enum record_method): New enum. * target-debug.h (target_debug_print_enum_record_method: New define. * target-delegates.c: Regenerate. * target.c (target_record_method): New function. * target.h: Include record.h. (struct target_ops) <to_record_method>: New field. (target_record_method): New export. Change-Id: I05daa70e4e08a19901e848c731bb7d60cd87cc5a
Diffstat (limited to 'gdb/target.h')
-rw-r--r--gdb/target.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h
index 8df117e..943a0e2 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -72,6 +72,7 @@ struct inferior;
#include "vec.h"
#include "gdb_signals.h"
#include "btrace.h"
+#include "record.h"
#include "command.h"
#include "break-common.h" /* For enum target_hw_bp_type. */
@@ -1149,6 +1150,10 @@ struct target_ops
const struct btrace_target_info *)
TARGET_DEFAULT_RETURN (NULL);
+ /* Current recording method. */
+ enum record_method (*to_record_method) (struct target_ops *, ptid_t ptid)
+ TARGET_DEFAULT_RETURN (RECORD_METHOD_NONE);
+
/* Stop trace recording. */
void (*to_stop_recording) (struct target_ops *)
TARGET_DEFAULT_IGNORE ();
@@ -2495,6 +2500,9 @@ extern int target_supports_delete_record (void);
/* See to_delete_record in struct target_ops. */
extern void target_delete_record (void);
+/* See to_record_method. */
+extern enum record_method target_record_method (ptid_t ptid);
+
/* See to_record_is_replaying in struct target_ops. */
extern int target_record_is_replaying (ptid_t ptid);