aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-05-07 18:20:21 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-05-07 18:20:21 +0000
commit6d350bb576b5a3495c99f1f6e6bc5e199851d36e (patch)
tree13cf98eaca8a6edb0dda64a68ce09b0208b13935 /gdb/infrun.c
parent3b95049e0a52a4b831c5338aa844d97df5e05df4 (diff)
downloadgdb-6d350bb576b5a3495c99f1f6e6bc5e199851d36e.zip
gdb-6d350bb576b5a3495c99f1f6e6bc5e199851d36e.tar.gz
gdb-6d350bb576b5a3495c99f1f6e6bc5e199851d36e.tar.bz2
* gdbarch.sh: Add skip_permanent_breakpoint callback.
* gdbarch.h, gdbarch.c: Regenerate. * infrun.c (SKIP_PERMANENT_BREAKPOINT): Remove default definition. (resume): Call gdbarch_skip_permanent_breakpoint instead of SKIP_PERMANENT_BREAKPOINT. Inline default case. * hppa-hpux-tdep.c (hppa_skip_permanent_breakpoint): Make static. Add REGCACHE argument. Use it instead of read/write_register. (hppa_hpux_init_abi): Install hppa_skip_permanent_breakpoint. * config/pa/tm-hppah.h: Delete file. * config/pa/hppa64.mt (DEPRECATED_TM_FILE): Set to tm-hppa.h. * config/pa/hppahpux.mt (DEPRECATED_TM_FILE): Likewise.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index b846903..dccd9ec 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -176,23 +176,6 @@ show_debug_infrun (struct ui_file *file, int from_tty,
#define SOLIB_IN_DYNAMIC_LINKER(pid,pc) 0
#endif
-/* We can't step off a permanent breakpoint in the ordinary way, because we
- can't remove it. Instead, we have to advance the PC to the next
- instruction. This macro should expand to a pointer to a function that
- does that, or zero if we have no such function. If we don't have a
- definition for it, we have to report an error. */
-#ifndef SKIP_PERMANENT_BREAKPOINT
-#define SKIP_PERMANENT_BREAKPOINT (default_skip_permanent_breakpoint)
-static void
-default_skip_permanent_breakpoint (void)
-{
- error (_("\
-The program is stopped at a permanent breakpoint, but GDB does not know\n\
-how to step past a permanent breakpoint on this architecture. Try using\n\
-a command like `return' or `jump' to continue execution."));
-}
-#endif
-
/* Convert the #defines into values. This is temporary until wfi control
flow is completely sorted out. */
@@ -543,7 +526,15 @@ resume (int step, enum target_signal sig)
at a permanent breakpoint; we need to step over it, but permanent
breakpoints can't be removed. So we have to test for it here. */
if (breakpoint_here_p (read_pc ()) == permanent_breakpoint_here)
- SKIP_PERMANENT_BREAKPOINT ();
+ {
+ if (gdbarch_skip_permanent_breakpoint_p (current_gdbarch))
+ gdbarch_skip_permanent_breakpoint (current_gdbarch, current_regcache);
+ else
+ error (_("\
+The program is stopped at a permanent breakpoint, but GDB does not know\n\
+how to step past a permanent breakpoint on this architecture. Try using\n\
+a command like `return' or `jump' to continue execution."));
+ }
if (SOFTWARE_SINGLE_STEP_P () && step)
{