]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* symfile.c (generic_load): Reset breakpoints after loading.
authorDaniel Jacobowitz <drow@false.org>
Wed, 17 Mar 2010 00:05:23 +0000 (00:05 +0000)
committerDaniel Jacobowitz <drow@false.org>
Wed, 17 Mar 2010 00:05:23 +0000 (00:05 +0000)
gdb/ChangeLog
gdb/symfile.c

index 6ce269211ef26f33de00f30e94860f9e4e5b2f1c..14f6a2cc16a9314aa104f28f86c2276e12a54ce1 100644 (file)
@@ -1,3 +1,7 @@
+2010-03-16  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * symfile.c (generic_load): Reset breakpoints after loading.
+
 2010-03-16  Holger Hans Peter Freyther  <zecke@selfish.org>
 
        * linux-record.c (record_linux_msghdr): Remove unintended semicolons.
index 3cb40f7bb4ca06e3b36162a00697858bd1e703da..9c28fb0d9a2412af92a014c734fef3ee1b5e58e2 100644 (file)
@@ -1920,6 +1920,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