diff options
author | Markus Metzger <markus.t.metzger@intel.com> | 2015-09-08 09:42:20 +0200 |
---|---|---|
committer | Markus Metzger <markus.t.metzger@intel.com> | 2015-09-18 14:30:12 +0200 |
commit | 797094dddfbcc3ea1d0efc900185ba3857d30226 (patch) | |
tree | 0d3918d5022b93aed714dcdc4d61831926c39a6f /gdb/record-btrace.c | |
parent | 4d10e986f499f330963c4641fd91046c57c94bd8 (diff) | |
download | gdb-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/record-btrace.c')
-rw-r--r-- | gdb/record-btrace.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c index b4e4560..e0b79a8 100644 --- a/gdb/record-btrace.c +++ b/gdb/record-btrace.c @@ -1910,8 +1910,7 @@ record_btrace_resume (struct target_ops *ops, ptid_t ptid, int step, /* ...and we stop replaying other threads if the thread to resume is not replaying. */ if (!btrace_is_replaying (tp) && execution_direction != EXEC_REVERSE) - ALL_NON_EXITED_THREADS (tp) - record_btrace_stop_replaying (tp); + target_record_stop_replaying (); } /* As long as we're not replaying, just forward the request. @@ -2596,6 +2595,17 @@ record_btrace_goto (struct target_ops *self, ULONGEST insn) record_btrace_set_replay (tp, &it); } +/* The to_record_stop_replaying method of target record-btrace. */ + +static void +record_btrace_stop_replaying_all (struct target_ops *self) +{ + struct thread_info *tp; + + ALL_NON_EXITED_THREADS (tp) + record_btrace_stop_replaying (tp); +} + /* The to_execution_direction target method. */ static enum exec_direction_kind @@ -2647,6 +2657,7 @@ init_record_btrace_ops (void) ops->to_call_history_from = record_btrace_call_history_from; ops->to_call_history_range = record_btrace_call_history_range; ops->to_record_is_replaying = record_btrace_is_replaying; + ops->to_record_stop_replaying = record_btrace_stop_replaying_all; ops->to_xfer_partial = record_btrace_xfer_partial; ops->to_remove_breakpoint = record_btrace_remove_breakpoint; ops->to_insert_breakpoint = record_btrace_insert_breakpoint; |