diff options
author | Michael J. Eager <eager@eagercon.com> | 2025-04-21 17:44:08 -0700 |
---|---|---|
committer | Michael J. Eager <eager@eagercon.com> | 2025-04-21 17:45:04 -0700 |
commit | d42db22aa54876e12f93d85f33a9dcc00d31c5b4 (patch) | |
tree | 9dfe6b326e8f697b25438ae23e885caa5e674203 /gdb/microblaze-linux-tdep.c | |
parent | 5da20c29124449b5522e1a8cea295e7da287cf9d (diff) | |
download | binutils-d42db22aa54876e12f93d85f33a9dcc00d31c5b4.zip binutils-d42db22aa54876e12f93d85f33a9dcc00d31c5b4.tar.gz binutils-d42db22aa54876e12f93d85f33a9dcc00d31c5b4.tar.bz2 |
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 <gopi@sankhya.com>
Signed-off-by: Michael J. Eager <eager@eagercon.com>
Diffstat (limited to 'gdb/microblaze-linux-tdep.c')
-rw-r--r-- | gdb/microblaze-linux-tdep.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c index 0f2f272..8dcbeaa 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 |