summaryrefslogtreecommitdiff
path: root/gdb/ppc-linux-tdep.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2008-03-13 12:22:14 +0000
committerDaniel Jacobowitz <dan@debian.org>2008-03-13 12:22:14 +0000
commitf54853edc39f32e925ef88fa80fc7dae9ec1755a (patch)
treed544f36bab22fa4af47d6396b2c24f09993d615b /gdb/ppc-linux-tdep.c
parent72d2eaf1f92bae1c26e8298eb39022e21b13485a (diff)
downloadgdb-f54853edc39f32e925ef88fa80fc7dae9ec1755a.tar.gz
* breakpoint.h (breakpoint_restore_shadows): New
declaration. * breakpoint.c (breakpoint_restore_shadows): New. (read_memory_nobpt): Delete. * gdbcore.h (read_memory_nobpt): Delete declaration. * target.c (memory_xfer_partial): Call breakpoint_restore_shadows. (restore_show_memory_breakpoints) (make_show_memory_beakpoints_cleanup): New. (show_memory_breakpoints): New. * target.h (make_show_memory_beakpoints_cleanup): Declare. * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Make sure we see memory breakpoints when checking if breakpoint is still there. * alpha-tdep.c, alphanbsd-tdep.c, frame.c, frv-tdep.c, hppa-linux-tdep.c, hppa-tdep.c, i386-linux-nat.c, i386-tdep.c, m68klinux-tdep.c, mips-tdep.c, mn10300-tdep.c, s390-tdep.c, sparc-tdep.c: Use target_read_memory instead of read_memory_nobpt.
Diffstat (limited to 'gdb/ppc-linux-tdep.c')
-rw-r--r--gdb/ppc-linux-tdep.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 872db01672c..d0901de02c7 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -281,12 +281,15 @@ ppc_linux_memory_remove_breakpoint (struct gdbarch *gdbarch,
int val;
int bplen;
gdb_byte old_contents[BREAKPOINT_MAX];
+ struct cleanup *cleanup;
/* Determine appropriate breakpoint contents and size for this address. */
bp = gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen);
if (bp == NULL)
error (_("Software breakpoints not implemented for this target."));
+ /* Make sure we see the memory breakpoints. */
+ cleanup = make_show_memory_breakpoints_cleanup (1);
val = target_read_memory (addr, old_contents, bplen);
/* If our breakpoint is no longer at the address, this means that the
@@ -295,6 +298,7 @@ ppc_linux_memory_remove_breakpoint (struct gdbarch *gdbarch,
if (val == 0 && memcmp (bp, old_contents, bplen) == 0)
val = target_write_memory (addr, bp_tgt->shadow_contents, bplen);
+ do_cleanups (cleanup);
return val;
}