aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2015-09-08 09:42:20 +0200
committerMarkus Metzger <markus.t.metzger@intel.com>2015-09-18 14:30:12 +0200
commit797094dddfbcc3ea1d0efc900185ba3857d30226 (patch)
tree0d3918d5022b93aed714dcdc4d61831926c39a6f /gdb/target-delegates.c
parent4d10e986f499f330963c4641fd91046c57c94bd8 (diff)
downloadgdb-797094dddfbcc3ea1d0efc900185ba3857d30226.zip
gdb-797094dddfbcc3ea1d0efc900185ba3857d30226.tar.gz
gdb-797094dddfbcc3ea1d0efc900185ba3857d30226.tar.bz2
target: add to_record_stop_replaying target method
Add a new target method to_record_stop_replaying to stop replaying. gdb/ * record-btrace.c (record_btrace_resume): Call target_record_stop_replaying. (record_btrace_stop_replaying_all): New. (init_record_btrace_ops): Initialize to_record_stop_replaying. * record-full.c (record_full_stop_replaying): New. (init_record_full_ops ): Initialize to_record_stop_replaying. * target-delegates.c: Regenerated. * target.c (target_record_stop_replaying): New. * target.h (struct target_ops) <to_record_stop_replaying>: New. (target_record_stop_replaying): New.
Diffstat (limited to 'gdb/target-delegates.c')
-rw-r--r--gdb/target-delegates.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index 9f909a0..a07c8c9 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -3631,6 +3631,28 @@ debug_record_is_replaying (struct target_ops *self, ptid_t arg1)
}
static void
+delegate_record_stop_replaying (struct target_ops *self)
+{
+ self = self->beneath;
+ self->to_record_stop_replaying (self);
+}
+
+static void
+tdefault_record_stop_replaying (struct target_ops *self)
+{
+}
+
+static void
+debug_record_stop_replaying (struct target_ops *self)
+{
+ fprintf_unfiltered (gdb_stdlog, "-> %s->to_record_stop_replaying (...)\n", debug_target.to_shortname);
+ debug_target.to_record_stop_replaying (&debug_target);
+ fprintf_unfiltered (gdb_stdlog, "<- %s->to_record_stop_replaying (", debug_target.to_shortname);
+ target_debug_print_struct_target_ops_p (&debug_target);
+ fputs_unfiltered (")\n", gdb_stdlog);
+}
+
+static void
delegate_goto_record_begin (struct target_ops *self)
{
self = self->beneath;
@@ -4267,6 +4289,8 @@ install_delegators (struct target_ops *ops)
ops->to_delete_record = delegate_delete_record;
if (ops->to_record_is_replaying == NULL)
ops->to_record_is_replaying = delegate_record_is_replaying;
+ if (ops->to_record_stop_replaying == NULL)
+ ops->to_record_stop_replaying = delegate_record_stop_replaying;
if (ops->to_goto_record_begin == NULL)
ops->to_goto_record_begin = delegate_goto_record_begin;
if (ops->to_goto_record_end == NULL)
@@ -4434,6 +4458,7 @@ install_dummy_methods (struct target_ops *ops)
ops->to_save_record = tdefault_save_record;
ops->to_delete_record = tdefault_delete_record;
ops->to_record_is_replaying = tdefault_record_is_replaying;
+ ops->to_record_stop_replaying = tdefault_record_stop_replaying;
ops->to_goto_record_begin = tdefault_goto_record_begin;
ops->to_goto_record_end = tdefault_goto_record_end;
ops->to_goto_record = tdefault_goto_record;
@@ -4587,6 +4612,7 @@ init_debug_target (struct target_ops *ops)
ops->to_save_record = debug_save_record;
ops->to_delete_record = debug_delete_record;
ops->to_record_is_replaying = debug_record_is_replaying;
+ ops->to_record_stop_replaying = debug_record_stop_replaying;
ops->to_goto_record_begin = debug_goto_record_begin;
ops->to_goto_record_end = debug_goto_record_end;
ops->to_goto_record = debug_goto_record;