aboutsummaryrefslogtreecommitdiff
path: root/gdb/ChangeLog
diff options
context:
space:
mode:
authorSergio Durigan Junior <sergiodj@redhat.com>2017-11-29 16:36:13 -0500
committerSergio Durigan Junior <sergiodj@redhat.com>2017-12-01 17:01:24 -0500
commit40fc416f4e22913ba2a2bafcc8da05f59c677b7d (patch)
tree52a38b093bf39970147473b52bde9f05687ba5c3 /gdb/ChangeLog
parent7f0f8ac8b15f5f5327116614b4137e5dd533ada2 (diff)
downloadgdb-40fc416f4e22913ba2a2bafcc8da05f59c677b7d.zip
gdb-40fc416f4e22913ba2a2bafcc8da05f59c677b7d.tar.gz
gdb-40fc416f4e22913ba2a2bafcc8da05f59c677b7d.tar.bz2
Make '{add-,}symbol-file' not care about the position of command line arguments
This is a bug that's been detected while doing the readnever work. If you use 'symbol-file' or 'add-symbol-file', the position of each argument passed to the command matters. This means that if you do: (gdb) symbol-file -readnow /foo/bar The symbol file specified will (correctly) have all of its symbols read by GDB (because of the -readnow flag). However, if you do: (gdb) symbol-file /foo/bar -readnow GDB will silently ignore the -readnow flag, because it was specified after the filename. This is not a good thing to do and may confuse the user. To address that, I've modified the argument parsing mechanisms of symbol_file_command and add_symbol_file_command to be "position-independent". I have also added one error call at the end of add_symbol_file_command's argument parsing logic, which now clearly complains if no filename has been specified. Both commands now support the "--" option to stop argument processing. This patch provides a testcase for both commands, in order to make sure that the argument order does not matter. It has been regression-tested on BuildBot. gdb/ChangeLog: 2017-12-01 Sergio Durigan Junior <sergiodj@redhat.com> * symfile.c (symbol_file_command): Call 'symbol_file_add_main_1' only after processing all command line options. (add_symbol_file_command): Modify logic to make arguments position-independent. gdb/testsuite/ChangeLog: 2017-12-01 Sergio Durigan Junior <sergiodj@redhat.com> * gdb.base/relocate.exp: Add tests to guarantee that arguments to 'symbol-file' and 'add-symbol-file' can be position-independent.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r--gdb/ChangeLog8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4eef5a9..b839e07 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * symfile.c (symbol_file_command): Call
+ 'symbol_file_add_main_1' only after processing all command
+ line options.
+ (add_symbol_file_command): Modify logic to make arguments
+ position-independent.
+
2017-12-01 Joel Brobecker <brobecker@adacore.com>
* ada-lang.c (symbol_list_obstack): Delete.