* symfile.c (generic_load): Reset breakpoints after loading.
authorDaniel Jacobowitz <drow@false.org>
Wed, 17 Mar 2010 18:08:11 +0000 (18:08 +0000)
committerDaniel Jacobowitz <drow@false.org>
Wed, 17 Mar 2010 18:08:11 +0000 (18:08 +0000)
gdb/ChangeLog
gdb/symfile.c

index 5578d4fab4c4e99362dc52b903d0545047e0a3b2..f1e5f6a0b39e50b4fe501582b0b5081f9207e42e 100644 (file)
@@ -1,3 +1,7 @@
+2010-03-17  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * symfile.c (generic_load): Reset breakpoints after loading.
+
 2010-03-17  Tom Tromey  <tromey@redhat.com>
 
        * linux-nat.c (linux_nat_detach): Check debug_linux_nat.
index 22c2852908d82f95054d58ddf4122adcab8faa57..c1d64eaa5c03d4b4c3d81f895547d22d0f53d5d0 100644 (file)
@@ -1893,6 +1893,16 @@ generic_load (char *args, int from_tty)
      for other targets too.  */
   regcache_write_pc (get_current_regcache (), entry);
 
+  /* Reset breakpoints, now that we have changed the load image.  For
+     instance, breakpoints may have been set (or reset, by
+     post_create_inferior) while connected to the target but before we
+     loaded the program.  In that case, the prologue analyzer could
+     have read instructions from the target to find the right
+     breakpoint locations.  Loading has changed the contents of that
+     memory.  */
+
+  breakpoint_re_set ();
+
   /* FIXME: are we supposed to call symbol_file_add or not?  According
      to a comment from remote-mips.c (where a call to symbol_file_add
      was commented out), making the call confuses GDB if more than one
This page took 0.038678 seconds and 4 git commands to generate.