This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Check for symbols at "load"
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Tue, 13 Jun 2006 16:56:24 -0400
- Subject: [commit] Check for symbols at "load"
If you're connected to a simple remote target, restarting the program
might (depending on your target) be as simple as "load; jump *_start".
That means there's no "run" or "target", which is where we normally check
for a changed executable; so do that at "load" too. This is harmless if
the files haven't changed and far less confusing if they have.
Committed.
--
Daniel Jacobowitz
CodeSourcery
2006-06-13 Daniel Jacobowitz <dan@codesourcery.com>
* symfile.c (load_command): Check for a changed executable before
"load".
Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.171
diff -u -p -r1.171 symfile.c
--- symfile.c 25 Feb 2006 04:36:39 -0000 1.171
+++ symfile.c 13 Jun 2006 20:53:46 -0000
@@ -1500,6 +1500,11 @@ load_command (char *arg, int from_tty)
}
}
+ /* The user might be reloading because the binary has changed. Take
+ this opportunity to check. */
+ reopen_exec_file ();
+ reread_symbols ();
+
target_load (arg, from_tty);
/* After re-loading the executable, we don't really know which