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:
Markus Metzger
2015-09-17 11:14:55 +02:00
parent 797094dddf
commit 7ff27e9bab
6 changed files with 85 additions and 0 deletions

View File

@ -1157,6 +1157,11 @@ struct target_ops
int (*to_record_is_replaying) (struct target_ops *, ptid_t ptid)
TARGET_DEFAULT_RETURN (0);
/* Query if the record target will replay PTID if it were resumed in
execution direction DIR. */
int (*to_record_will_replay) (struct target_ops *, ptid_t ptid, int dir)
TARGET_DEFAULT_RETURN (0);
/* Stop replaying. */
void (*to_record_stop_replaying) (struct target_ops *)
TARGET_DEFAULT_IGNORE ();
@ -2446,6 +2451,9 @@ extern void target_delete_record (void);
/* See to_record_is_replaying in struct target_ops. */
extern int target_record_is_replaying (ptid_t ptid);
/* See to_record_will_replay in struct target_ops. */
extern int target_record_will_replay (ptid_t ptid, int dir);
/* See to_record_stop_replaying in struct target_ops. */
extern void target_record_stop_replaying (void);