aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2010-02-24 00:29:02 +0000
committerPedro Alves <palves@redhat.com>2010-02-24 00:29:02 +0000
commitab92d69b1e3a3db7bd4f9564ad3b5bbccc9a7988 (patch)
tree8a162edfddda961ec90ae6159b96365b9a2bb735 /gdb
parente6baae03e6244d5899466fc4cc38a18c13b049ff (diff)
downloadgdb-ab92d69b1e3a3db7bd4f9564ad3b5bbccc9a7988.zip
gdb-ab92d69b1e3a3db7bd4f9564ad3b5bbccc9a7988.tar.gz
gdb-ab92d69b1e3a3db7bd4f9564ad3b5bbccc9a7988.tar.bz2
* breakpoint.c (breakpoint_init_inferior): Also delete
bp_shlib_event breakpoints. * solib-frv.c (enable_break): Remove call to remove_solib_event_breakpoints. * solib-svr4.c (enable_break): Ditto. * solib-darwin.c (darwin_solib_create_inferior_hook): Ditto. * solib-pa64.c (pa64_solib_create_inferior_hook): Ditto. * solib-som.c (som_solib_create_inferior_hook): Ditto. * solib-spu.c (spu_enable_break): Ditto.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog12
-rw-r--r--gdb/breakpoint.c26
-rw-r--r--gdb/solib-darwin.c4
-rw-r--r--gdb/solib-frv.c4
-rw-r--r--gdb/solib-pa64.c4
-rw-r--r--gdb/solib-som.c4
-rw-r--r--gdb/solib-spu.c4
-rw-r--r--gdb/solib-svr4.c4
8 files changed, 34 insertions, 28 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3d9db88..2fa16f4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,15 @@
+2010-02-24 Pedro Alves <pedro@codesourcery.com>
+
+ * breakpoint.c (breakpoint_init_inferior): Also delete
+ bp_shlib_event breakpoints.
+ * solib-frv.c (enable_break): Remove call to
+ remove_solib_event_breakpoints.
+ * solib-svr4.c (enable_break): Ditto.
+ * solib-darwin.c (darwin_solib_create_inferior_hook): Ditto.
+ * solib-pa64.c (pa64_solib_create_inferior_hook): Ditto.
+ * solib-som.c (som_solib_create_inferior_hook): Ditto.
+ * solib-spu.c (spu_enable_break): Ditto.
+
2010-02-23 Harald Koenig <H.Koenig@science-computing.de>
* c-exp.y (token_and_value): s/union YYSTYPE/YYSTYPE.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 4224c76..4af69a4 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -2248,13 +2248,31 @@ breakpoint_init_inferior (enum inf_context context)
switch (b->type)
{
case bp_call_dummy:
- case bp_watchpoint_scope:
/* If the call dummy breakpoint is at the entry point it will
- cause problems when the inferior is rerun, so we better
- get rid of it.
+ cause problems when the inferior is rerun, so we better get
+ rid of it. */
+
+ case bp_watchpoint_scope:
+
+ /* Also get rid of scope breakpoints. */
+
+ case bp_shlib_event:
+
+ /* Also remove solib event breakpoints. Their addresses may
+ have changed since the last time we ran the program.
+ Actually we may now be debugging against different target;
+ and so the solib backend that installed this breakpoint may
+ not be used in by the target. E.g.,
+
+ (gdb) file prog-linux
+ (gdb) run # native linux target
+ ...
+ (gdb) kill
+ (gdb) file prog-win.exe
+ (gdb) tar rem :9999 # remote Windows gdbserver.
+ */
- Also get rid of scope breakpoints. */
delete_breakpoint (b);
break;
diff --git a/gdb/solib-darwin.c b/gdb/solib-darwin.c
index 3c70089..3492567 100644
--- a/gdb/solib-darwin.c
+++ b/gdb/solib-darwin.c
@@ -309,10 +309,6 @@ darwin_solib_create_inferior_hook (int from_tty)
bfd *dyld_bfd = NULL;
struct inferior *inf = current_inferior ();
- /* First, remove all the solib event breakpoints. Their addresses
- may have changed since the last time we ran the program. */
- remove_solib_event_breakpoints ();
-
/* Find the program interpreter. */
interp_name = find_program_interpreter ();
if (!interp_name)
diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c
index 0976c83..245ca84 100644
--- a/gdb/solib-frv.c
+++ b/gdb/solib-frv.c
@@ -818,10 +818,6 @@ enable_break (void)
{
asection *interp_sect;
- /* Remove all the solib event breakpoints. Their addresses
- may have changed since the last time we ran the program. */
- remove_solib_event_breakpoints ();
-
if (symfile_objfile == NULL)
{
if (solib_frv_debug)
diff --git a/gdb/solib-pa64.c b/gdb/solib-pa64.c
index df97f31..1643e4e 100644
--- a/gdb/solib-pa64.c
+++ b/gdb/solib-pa64.c
@@ -338,10 +338,6 @@ pa64_solib_create_inferior_hook (int from_tty)
struct objfile *objfile;
CORE_ADDR anaddr;
- /* First, remove all the solib event breakpoints. Their addresses
- may have changed since the last time we ran the program. */
- remove_solib_event_breakpoints ();
-
if (symfile_objfile == NULL)
return;
diff --git a/gdb/solib-som.c b/gdb/solib-som.c
index 6540d0b..1ac83e1 100644
--- a/gdb/solib-som.c
+++ b/gdb/solib-som.c
@@ -192,10 +192,6 @@ som_solib_create_inferior_hook (int from_tty)
char buf[4];
CORE_ADDR anaddr;
- /* First, remove all the solib event breakpoints. Their addresses
- may have changed since the last time we ran the program. */
- remove_solib_event_breakpoints ();
-
if (symfile_objfile == NULL)
return;
diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c
index 94a77fb..75e6236 100644
--- a/gdb/solib-spu.c
+++ b/gdb/solib-spu.c
@@ -367,10 +367,6 @@ spu_enable_break (struct objfile *objfile)
static void
spu_solib_create_inferior_hook (int from_tty)
{
- /* Remove all previously installed solib breakpoints. Both the SVR4
- code and us will re-install all required breakpoints. */
- remove_solib_event_breakpoints ();
-
/* Handle SPE stand-alone executables. */
if (spu_standalone_p ())
{
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 8edc889..4317283 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -1315,10 +1315,6 @@ enable_break (struct svr4_info *info, int from_tty)
gdb_byte *interp_name;
CORE_ADDR sym_addr;
- /* First, remove all the solib event breakpoints. Their addresses
- may have changed since the last time we ran the program. */
- remove_solib_event_breakpoints ();
-
info->interp_text_sect_low = info->interp_text_sect_high = 0;
info->interp_plt_sect_low = info->interp_plt_sect_high = 0;