target: allow decr_pc_after_break to be defined by the target
Allow the target to define which value to use in decr_pc_after_break. It defaults to gdbarch_decr_pc_after_break (GDBARCH). 2014-01-16 Markus Metzger <markus.t.metzger@intel.com> * target.h (struct target_ops) <to_decr_pc_after_break>: New. (forward_target_decr_pc_after_break) (target_decr_pc_after_break): New. * target.c (forward_target_decr_pc_after_break) (target_decr_pc_after_break): New. * aix-thread.c (aix_thread_wait): Call target_decr_pc_after_break instead of gdbarch_decr_pc_after_break. * darwin-nat.c (cancel_breakpoint): Call target_decr_pc_after_break instead of gdbarch_decr_pc_after_break. * infrun.c (adjust_pc_after_break): Call target_decr_pc_after_break instead of gdbarch_decr_pc_after_break. * linux-nat.c (cancel_breakpoint): Call target_decr_pc_after_break instead of gdbarch_decr_pc_after_break. * linux-thread-db.c (check_event): Call target_decr_pc_after_break instead of gdbarch_decr_pc_after_break. * record-full.c (record_full_wait_1): Call target_decr_pc_after_break instead of gdbarch_decr_pc_after_break.
This commit is contained in:
parent
6e07b1d27e
commit
118e6252ca
9 changed files with 68 additions and 13 deletions
21
gdb/target.c
21
gdb/target.c
|
@ -4532,6 +4532,27 @@ target_get_tailcall_unwinder (void)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* See target.h. */
|
||||
|
||||
CORE_ADDR
|
||||
forward_target_decr_pc_after_break (struct target_ops *ops,
|
||||
struct gdbarch *gdbarch)
|
||||
{
|
||||
for (; ops != NULL; ops = ops->beneath)
|
||||
if (ops->to_decr_pc_after_break != NULL)
|
||||
return ops->to_decr_pc_after_break (ops, gdbarch);
|
||||
|
||||
return gdbarch_decr_pc_after_break (gdbarch);
|
||||
}
|
||||
|
||||
/* See target.h. */
|
||||
|
||||
CORE_ADDR
|
||||
target_decr_pc_after_break (struct gdbarch *gdbarch)
|
||||
{
|
||||
return forward_target_decr_pc_after_break (current_target.beneath, gdbarch);
|
||||
}
|
||||
|
||||
static int
|
||||
deprecated_debug_xfer_memory (CORE_ADDR memaddr, bfd_byte *myaddr, int len,
|
||||
int write, struct mem_attrib *attrib,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue