aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2006-02-07 19:40:31 +0000
committerJoel Brobecker <brobecker@gnat.com>2006-02-07 19:40:31 +0000
commit927890d004caf4555fdd59e5e74d6ba07f66d776 (patch)
tree4ec1c805ec4b67cf65dfa211f18f1fd195c7a76b /gdb/symfile.c
parent2db2d57137d83f9a8ec906fbc940592283c4648a (diff)
downloadfsf-binutils-gdb-927890d004caf4555fdd59e5e74d6ba07f66d776.zip
fsf-binutils-gdb-927890d004caf4555fdd59e5e74d6ba07f66d776.tar.gz
fsf-binutils-gdb-927890d004caf4555fdd59e5e74d6ba07f66d776.tar.bz2
* symfile.c (add_symbol_file_command): Abort if the user forgot
to provide the address when the file has been loaded.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 93cb009..e63ee53 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1876,6 +1876,13 @@ add_symbol_file_command (char *args, int from_tty)
argcnt++;
}
+ /* This command takes at least two arguments. The first one is a
+ filename, and the second is the address where this file has been
+ loaded. Abort now if this address hasn't been provided by the
+ user. */
+ if (section_index < 1)
+ error (_("The address where %s has been loaded is missing"), filename);
+
/* Print the prompt for the query below. And save the arguments into
a sect_addr_info structure to be passed around to other
functions. We have to split this up into separate print