]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
MicroBlaze: Make sure we see memory breakpoints before reading
authorMichael J. Eager <eager@eagercon.com>
Tue, 22 Apr 2025 00:44:08 +0000 (17:44 -0700)
committerMichael J. Eager <eager@eagercon.com>
Tue, 22 Apr 2025 00:45:04 +0000 (17:45 -0700)
For linux target, when trying to run a program from gdb, the
following defect is seen:

Program received signal SIGILL, Illegal instruction.
0x48004674 in _dl_debug_state () from target:/lib/ld.so.1

* microblaze-linux-tdep.c (microblaze_linux_memory_remove_breakpoint):
  Call make_scoped_restore_show_memory_breakpoints

Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com>
Signed-off-by: Michael J. Eager <eager@eagercon.com>
gdb/microblaze-linux-tdep.c

index 0f2f2726b9409d8fa11fc20dbd4937e787af1d74..8dcbeaafb83456c75cbf8e26cb83e4b38a70c630 100644 (file)
@@ -49,6 +49,9 @@ microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch,
   /* Determine appropriate breakpoint contents and size for this address.  */
   bp = gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen);
 
+  /* Make sure we see the memory breakpoints.  */
+  scoped_restore restore_memory
+    = make_scoped_restore_show_memory_breakpoints (1);
   val = target_read_memory (addr, old_contents, bplen);
 
   /* If our breakpoint is no longer at the address, this means that the