aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2015-09-08 08:26:16 +0200
committerMarkus Metzger <markus.t.metzger@intel.com>2015-09-18 14:28:43 +0200
commita52eab48080f29feaa56421481cfea221ee6346e (patch)
treed95a01d849ca678ff4e91bc17e41cc5d470d8d45 /gdb/target-delegates.c
parentcbb55fa7a110e499dae0170060d762eb3f243768 (diff)
downloadgdb-a52eab48080f29feaa56421481cfea221ee6346e.zip
gdb-a52eab48080f29feaa56421481cfea221ee6346e.tar.gz
gdb-a52eab48080f29feaa56421481cfea221ee6346e.tar.bz2
target, record: add PTID argument to to_record_is_replaying
The to_record_is_replaying target method is used to query record targets if they are replaying. This is currently interpreted as "is any thread being replayed". Add a PTID argument and change the interpretation to "is any thread matching PTID being replayed". Change all users to pass minus_one_ptid to preserve the old meaning. The record full target does not really support multi-threading and ignores the PTID argument. gdb/ * record-btrace.c (record_btrace_is_replaying): Add ptid argument. Update users to pass minus_one_ptid. * record-full.c (record_full_is_replaying): Add ptid argument (ignored). * record.c (cmd_record_delete): Pass inferior_ptid to target_record_is_replaying. * target-delegates.c: Regenerated. * target.c (target_record_is_replaying): Add ptid argument. * target.h (struct target_ops) <to_record_is_replaying>: Add ptid argument. (target_record_is_replaying): Add ptid argument.
Diffstat (limited to 'gdb/target-delegates.c')
-rw-r--r--gdb/target-delegates.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index c358814..9f909a0 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -3602,26 +3602,28 @@ debug_delete_record (struct target_ops *self)
}
static int
-delegate_record_is_replaying (struct target_ops *self)
+delegate_record_is_replaying (struct target_ops *self, ptid_t arg1)
{
self = self->beneath;
- return self->to_record_is_replaying (self);
+ return self->to_record_is_replaying (self, arg1);
}
static int
-tdefault_record_is_replaying (struct target_ops *self)
+tdefault_record_is_replaying (struct target_ops *self, ptid_t arg1)
{
return 0;
}
static int
-debug_record_is_replaying (struct target_ops *self)
+debug_record_is_replaying (struct target_ops *self, ptid_t arg1)
{
int result;
fprintf_unfiltered (gdb_stdlog, "-> %s->to_record_is_replaying (...)\n", debug_target.to_shortname);
- result = debug_target.to_record_is_replaying (&debug_target);
+ result = debug_target.to_record_is_replaying (&debug_target, arg1);
fprintf_unfiltered (gdb_stdlog, "<- %s->to_record_is_replaying (", debug_target.to_shortname);
target_debug_print_struct_target_ops_p (&debug_target);
+ fputs_unfiltered (", ", gdb_stdlog);
+ target_debug_print_ptid_t (arg1);
fputs_unfiltered (") = ", gdb_stdlog);
target_debug_print_int (result);
fputs_unfiltered ("\n", gdb_stdlog);