aboutsummaryrefslogtreecommitdiff
path: root/gdb/ia64-tdep.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2008-04-29 21:14:06 +0000
committerJoel Brobecker <brobecker@gnat.com>2008-04-29 21:14:06 +0000
commit1de34ab72d7fe2c5a98a72f0e2b02d05828687a5 (patch)
tree0bf12040a57095aeff169d14e9484bd05f336b59 /gdb/ia64-tdep.c
parentea42b34a37453fb7cf3a4ac7a5a6d0d456623fd9 (diff)
downloadgdb-1de34ab72d7fe2c5a98a72f0e2b02d05828687a5.zip
gdb-1de34ab72d7fe2c5a98a72f0e2b02d05828687a5.tar.gz
gdb-1de34ab72d7fe2c5a98a72f0e2b02d05828687a5.tar.bz2
* ia64-tdep.c (ia64_memory_remove_breakpoint): Set
show_memory_breakpoints to 1 while reading the instruction bundle.
Diffstat (limited to 'gdb/ia64-tdep.c')
-rw-r--r--gdb/ia64-tdep.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 37ed4fc..dd2064c 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -598,9 +598,15 @@ ia64_memory_remove_breakpoint (struct gdbarch *gdbarch,
long long instr;
int val;
int template;
+ struct cleanup *cleanup;
addr &= ~0x0f;
+ /* Disable the automatic memory restoration from breakpoints while
+ we read our instruction bundle. Otherwise, the general restoration
+ mechanism kicks in and ends up corrupting our bundle, because it
+ is not aware of the concept of instruction bundles. */
+ cleanup = make_show_memory_breakpoints_cleanup (1);
val = target_read_memory (addr, bundle, BUNDLE_LEN);
/* Check for L type instruction in 2nd slot, if present then
@@ -616,6 +622,7 @@ ia64_memory_remove_breakpoint (struct gdbarch *gdbarch,
if (val == 0)
target_write_memory (addr, bundle, BUNDLE_LEN);
+ do_cleanups (cleanup);
return val;
}