aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2017-03-07 13:46:08 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2017-03-07 16:47:46 -0500
commita243d6ae94bdc69081e7f8c3a0f55465a8077e28 (patch)
tree74e470200e6695822f1668073a9100581674ebe8 /gdb/target-delegates.c
parent0815e83131004e620c789b7f40d953ec1f8c5428 (diff)
downloadbinutils-users/simark/ptid-in-fetch-store-regs.zip
binutils-users/simark/ptid-in-fetch-store-regs.tar.gz
binutils-users/simark/ptid-in-fetch-store-regs.tar.bz2
Pass ptid to to_prepare_to_storeusers/simark/ptid-in-fetch-store-regs
In the same vein as to_fetch_registers and to_store_registers, we can update to_prepare_to_store to take the ptid of the thread whose register we want to store as a parameter, rather than reading it from inferior_ptid. gdb/ChangeLog: * target.h (struct target_ops) <to_prepare_to_store>: Add ptid_t parameter. (target_prepare_to_store): Likewise. * target-delegates.c: Re-generate. * inf-child.c (inf_child_prepare_to_store): Add ptid parameter. * ppc-ravenscar-thread.c (ppc_ravenscar_generic_prepare_to_store): Likewise. * ravenscar-thread.c (ravenscar_prepare_to_store): Add ptid parameter and use it instead of inferior_ptid. * ravenscar-thread.h (struct ravenscar_arch_ops) <to_prepare_to_store>: Add ptid parameter. * record-btrace.c (record_btrace_prepare_to_store): Add ptid parameter and use it instead of inferior_ptid. * record-full.c (record_full_core_prepare_to_store): Add ptid parameter. * regcache.c (regcache_raw_write): Pass ptid to target_prepare_to_store. * remote-sim.c (gdbsim_prepare_to_store): Add ptid parameter. * remote.c (remote_prepare_to_store): Add ptid parameter. * sparc-ravenscar-thread.c (sparc_ravenscar_prepare_to_store): Add ptid parameter.
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 3f1c236..2653438 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -216,27 +216,29 @@ debug_store_registers (struct target_ops *self, struct regcache *arg1, ptid_t ar
}
static void
-delegate_prepare_to_store (struct target_ops *self, struct regcache *arg1)
+delegate_prepare_to_store (struct target_ops *self, struct regcache *arg1, ptid_t arg2)
{
self = self->beneath;
- self->to_prepare_to_store (self, arg1);
+ self->to_prepare_to_store (self, arg1, arg2);
}
static void
-tdefault_prepare_to_store (struct target_ops *self, struct regcache *arg1)
+tdefault_prepare_to_store (struct target_ops *self, struct regcache *arg1, ptid_t arg2)
{
noprocess ();
}
static void
-debug_prepare_to_store (struct target_ops *self, struct regcache *arg1)
+debug_prepare_to_store (struct target_ops *self, struct regcache *arg1, ptid_t arg2)
{
fprintf_unfiltered (gdb_stdlog, "-> %s->to_prepare_to_store (...)\n", debug_target.to_shortname);
- debug_target.to_prepare_to_store (&debug_target, arg1);
+ debug_target.to_prepare_to_store (&debug_target, arg1, arg2);
fprintf_unfiltered (gdb_stdlog, "<- %s->to_prepare_to_store (", debug_target.to_shortname);
target_debug_print_struct_target_ops_p (&debug_target);
fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_struct_regcache_p (arg1);
+ fputs_unfiltered (", ", gdb_stdlog);
+ target_debug_print_ptid_t (arg2);
fputs_unfiltered (")\n", gdb_stdlog);
}