From: Michael J. Eager Date: Tue, 22 Apr 2025 00:44:08 +0000 (-0700) Subject: MicroBlaze: Make sure we see memory breakpoints before reading X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d42db22aa54876e12f93d85f33a9dcc00d31c5b4;p=thirdparty%2Fbinutils-gdb.git MicroBlaze: Make sure we see memory breakpoints before reading 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 Signed-off-by: Michael J. Eager --- diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c index 0f2f2726b94..8dcbeaafb83 100644 --- a/gdb/microblaze-linux-tdep.c +++ b/gdb/microblaze-linux-tdep.c @@ -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