From d29caefc4bbebfc6822564b2fbcff7f49c679be7 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 17 Nov 2003 00:55:49 +0000 Subject: [PATCH] * breakpoint.c (re_enable_breakpoints_in_shlibs): Only re-enable a bp_shlib_disabled breakpoint if there is a shared library mapped at its expected address. --- gdb/ChangeLog | 6 ++++++ gdb/breakpoint.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3e10ccfcb4a..f92fadcce67 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2003-11-16 Daniel Jacobowitz + + * breakpoint.c (re_enable_breakpoints_in_shlibs): Only re-enable a + bp_shlib_disabled breakpoint if there is a shared library mapped + at its expected address. + 2003-11-16 Andrew Cagney * configure.tgt: Delete mips*tx39*-elf*. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 0e95e208cc3..02874bcf290 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -4297,11 +4297,12 @@ re_enable_breakpoints_in_shlibs (void) ALL_BREAKPOINTS (b) if (b->enable_state == bp_shlib_disabled) { - char buf[1]; + char buf[1], *lib; /* Do not reenable the breakpoint if the shared library is still not mapped in. */ - if (target_read_memory (b->loc->address, buf, 1) == 0) + lib = PC_SOLIB (b->loc->address); + if (lib != NULL && target_read_memory (b->loc->address, buf, 1) == 0) b->enable_state = bp_enabled; } } -- 2.30.2