* ia64-tdep.c (ia64_memory_remove_breakpoint): Set
authorJoel Brobecker <brobecker@gnat.com>
Tue, 29 Apr 2008 21:14:06 +0000 (21:14 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Tue, 29 Apr 2008 21:14:06 +0000 (21:14 +0000)
        show_memory_breakpoints to 1 while reading the instruction bundle.

gdb/ChangeLog
gdb/ia64-tdep.c

index 35c6ceac1041ee3461f86b33a50e035fcca687d1..b5a31dda5c27f005bdefd2e445ad8262067159ae 100644 (file)
@@ -1,3 +1,8 @@
+2008-04-29  Joel Brobecker  <brobecker@adacore.com>
+
+       * ia64-tdep.c (ia64_memory_remove_breakpoint): Set
+       show_memory_breakpoints to 1 while reading the instruction bundle.
+
 2008-04-29  Joel Brobecker  <brobecker@adacore.com>
 
        * gdbarch.sh: Document the return_value method. Explain that
index 37ed4fcbabd0148846a84543f9376546878ecba2..dd2064c9ba9ad91e639e1613e7cbc80f2f084238 100644 (file)
@@ -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;
 }
 
This page took 0.032086 seconds and 4 git commands to generate.