* breakpoint.c (breakpoint_init_inferior): Also delete
authorPedro Alves <palves@redhat.com>
Wed, 24 Feb 2010 00:29:02 +0000 (00:29 +0000)
committerPedro Alves <palves@redhat.com>
Wed, 24 Feb 2010 00:29:02 +0000 (00:29 +0000)
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.

gdb/ChangeLog
gdb/breakpoint.c
gdb/solib-darwin.c
gdb/solib-frv.c
gdb/solib-pa64.c
gdb/solib-som.c
gdb/solib-spu.c
gdb/solib-svr4.c

index 3d9db88999803074e233c35ecbae5cafcf2319bd..2fa16f416b1fa89761860ee2cdc21ab5a94d2b63 100644 (file)
@@ -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.
index 4224c76cbc5a340cf77758b9827d36fbca7d6727..4af69a4a2d363e096a5490e12aec902a215a1ede 100644 (file)
@@ -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;
 
index 3c700899d40db3177a45b87b43a425c9eb643d1b..34925671114c39e13908a107c76d1e3ef747a4d5 100644 (file)
@@ -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)
index 0976c8352eacd49c4bd0d582d47b43c6fefab4a1..245ca84f763214c697de64fd6ef58b7ffa21e3fe 100644 (file)
@@ -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)
index df97f319cf04fbe0e8b8728d42edf9b8bf3aabc5..1643e4e59881dd1ff18df1253122845c23439fc4 100644 (file)
@@ -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;
 
index 6540d0b7bd5726ebfdd3c6783c4ec7ba57e6ba00..1ac83e15c37912e1613092a6592d104418c0a78d 100644 (file)
@@ -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;
 
index 94a77fb692f95bbf1e153750f64f128490ec4661..75e6236203019f78e749aafa7b47f0f7b2770f3b 100644 (file)
@@ -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 ())
     {
index 8edc8891ac141d2ad764dd21352561e2c1e96c79..4317283448819827eed693f1e4b0569abe573047 100644 (file)
@@ -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;
 
This page took 0.034762 seconds and 4 git commands to generate.