aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2010-03-17 18:08:11 +0000
committerDaniel Jacobowitz <drow@false.org>2010-03-17 18:08:11 +0000
commit38963c97b7990d8a4f9cbe8b58ec0519e451e571 (patch)
tree500759b391b203e8dd7a4ff0c5fdd379b237961d /gdb/symfile.c
parentddabfc735b012068343f76ec05226033eb57fa22 (diff)
downloadgdb-38963c97b7990d8a4f9cbe8b58ec0519e451e571.zip
gdb-38963c97b7990d8a4f9cbe8b58ec0519e451e571.tar.gz
gdb-38963c97b7990d8a4f9cbe8b58ec0519e451e571.tar.bz2
* symfile.c (generic_load): Reset breakpoints after loading.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 22c2852..c1d64ea 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -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