aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-nat.c
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2013-12-18 11:09:34 +0100
committerMarkus Metzger <markus.t.metzger@intel.com>2014-01-16 13:12:00 +0100
commit118e6252ca1cabce6d4480a4f24c53e5456a2cfa (patch)
treea08bdea923afba0540633d88e19f84842cbc0580 /gdb/linux-nat.c
parent6e07b1d27e5d3fb20e7d13f0cadfd923243fc48d (diff)
downloadgdb-118e6252ca1cabce6d4480a4f24c53e5456a2cfa.zip
gdb-118e6252ca1cabce6d4480a4f24c53e5456a2cfa.tar.gz
gdb-118e6252ca1cabce6d4480a4f24c53e5456a2cfa.tar.bz2
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.
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r--gdb/linux-nat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 2371ad4..d144c77 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -2736,7 +2736,7 @@ cancel_breakpoint (struct lwp_info *lp)
struct gdbarch *gdbarch = get_regcache_arch (regcache);
CORE_ADDR pc;
- pc = regcache_read_pc (regcache) - gdbarch_decr_pc_after_break (gdbarch);
+ pc = regcache_read_pc (regcache) - target_decr_pc_after_break (gdbarch);
if (breakpoint_inserted_here_p (get_regcache_aspace (regcache), pc))
{
if (debug_linux_nat)
@@ -2745,7 +2745,7 @@ cancel_breakpoint (struct lwp_info *lp)
target_pid_to_str (lp->ptid));
/* Back up the PC if necessary. */
- if (gdbarch_decr_pc_after_break (gdbarch))
+ if (target_decr_pc_after_break (gdbarch))
regcache_write_pc (regcache, pc);
return 1;