aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2009-03-23 18:34:03 +0000
committerPaul Pluzhnikov <ppluzhnikov@google.com>2009-03-23 18:34:03 +0000
commite2dd7057cf1a2244492e04fa3375cf45a55210c2 (patch)
tree88335b6fd80040fff19552118265b011ec37e4e6 /gdb
parent0dd7fb99eb2e120421bad8daec9c27b9b41869f4 (diff)
downloadgdb-e2dd7057cf1a2244492e04fa3375cf45a55210c2.zip
gdb-e2dd7057cf1a2244492e04fa3375cf45a55210c2.tar.gz
gdb-e2dd7057cf1a2244492e04fa3375cf45a55210c2.tar.bz2
2009-03-23 Paul Pluzhnikov <ppluzhnikov@google.com>
* breakpoint.c (disable_breakpoints_in_unloaded_shlib): Use solib_contains_address_p instead of searching.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/breakpoint.c34
2 files changed, 19 insertions, 20 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c347f67..6d5d9ca 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-23 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Use
+ solib_contains_address_p instead of searching.
+
2009-03-23 Tom Tromey <tromey@redhat.com>
* charset.c (ICONV_CONST) <PHONY_ICONV>: Define.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 5affe4e..7e50342 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4502,28 +4502,22 @@ disable_breakpoints_in_unloaded_shlib (struct so_list *solib)
struct breakpoint *b = loc->owner;
if ((loc->loc_type == bp_loc_hardware_breakpoint
|| loc->loc_type == bp_loc_software_breakpoint)
- && !loc->shlib_disabled)
+ && !loc->shlib_disabled
+ && (b->type == bp_breakpoint || b->type == bp_hardware_breakpoint)
+ && solib_contains_address_p (solib, loc->address))
{
-#ifdef PC_SOLIB
- char *so_name = PC_SOLIB (loc->address);
-#else
- char *so_name = solib_name_from_address (loc->address);
-#endif
- if (so_name && !strcmp (so_name, solib->so_name))
- {
- loc->shlib_disabled = 1;
- /* At this point, we cannot rely on remove_breakpoint
- succeeding so we must mark the breakpoint as not inserted
- to prevent future errors occurring in remove_breakpoints. */
- loc->inserted = 0;
- if (!disabled_shlib_breaks)
- {
- target_terminal_ours_for_output ();
- warning (_("Temporarily disabling breakpoints for unloaded shared library \"%s\""),
- so_name);
- }
- disabled_shlib_breaks = 1;
+ loc->shlib_disabled = 1;
+ /* At this point, we cannot rely on remove_breakpoint
+ succeeding so we must mark the breakpoint as not inserted
+ to prevent future errors occurring in remove_breakpoints. */
+ loc->inserted = 0;
+ if (!disabled_shlib_breaks)
+ {
+ target_terminal_ours_for_output ();
+ warning (_("Temporarily disabling breakpoints for unloaded shared library \"%s\""),
+ solib->so_name);
}
+ disabled_shlib_breaks = 1;
}
}
}