aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-11-17 00:55:49 +0000
committerDaniel Jacobowitz <drow@false.org>2003-11-17 00:55:49 +0000
commitd29caefc4bbebfc6822564b2fbcff7f49c679be7 (patch)
tree5128b01449cea1f81be8eff5c05d8180102295b9 /gdb/breakpoint.c
parent593b2cd8892ac2851e4e49f0f839c413f7d46931 (diff)
downloadgdb-d29caefc4bbebfc6822564b2fbcff7f49c679be7.zip
gdb-d29caefc4bbebfc6822564b2fbcff7f49c679be7.tar.gz
gdb-d29caefc4bbebfc6822564b2fbcff7f49c679be7.tar.bz2
* 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.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 0e95e20..02874bc 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;
}
}