forked from Imagelibrary/binutils-gdb
target: add to_record_will_replay target method
Add a new target method to_record_will_replay to query if there is a record target that will replay at least one thread matching the argument PTID if it were executed in the argument execution direction. gdb/ * record-btrace.c ((record_btrace_will_replay): New. (init_record_btrace_ops): Initialize to_record_will_replay. * record-full.c ((record_full_will_replay): New. (init_record_full_ops): Initialize to_record_will_replay. * target-delegates.c: Regenerated. * target.c (target_record_will_replay): New. * target.h (struct target_ops) <to_record_will_replay>: New. (target_record_will_replay): New. Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
This commit is contained in:
@@ -1147,6 +1147,14 @@ record_btrace_is_replaying (struct target_ops *self, ptid_t ptid)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* The to_record_will_replay method of target record-btrace. */
|
||||
|
||||
static int
|
||||
record_btrace_will_replay (struct target_ops *self, ptid_t ptid, int dir)
|
||||
{
|
||||
return dir == EXEC_REVERSE || record_btrace_is_replaying (self, ptid);
|
||||
}
|
||||
|
||||
/* The to_xfer_partial method of target record-btrace. */
|
||||
|
||||
static enum target_xfer_status
|
||||
@@ -2657,6 +2665,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_will_replay = record_btrace_will_replay;
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user