The func command, available when starting gdb in dbx mode, is supposed
to take a function name and locate the frame for that function in the
stack. This has been broken for a while due to an invalid check of the
arguments within the worker function. Fixed in this commit.
gdb/ChangeLog:
* stack.c (func_command): Return early when there is no ARG
string.
gdb/testsuite/ChangeLog:
* gdb.base/dbx.exp (test_func): Remove xfails, update expected
results.
Remove literal line numbers from the commands and regexps in dbx.exp.
Add appropriate eye-catchers to average.c and sum.c and refer to those
instead.
gdb/testsuite/ChangeLog:
* gdb.base/average.c: Add eye-catchers.
* gdb.base/sum.c: Likewise.
* gdb.base/dbx.exp: Use eye-catchers to determine line numbers for
regexps dynamically.
See:
https://sourceware.org/ml/gdb-patches/2014-09/msg00404.html
We have a number of places that do gdb_run_cmd followed by gdb_expect,
when it would be better to use gdb_test_multiple or gdb_test.
This converts all that "grep gdb_run_cmd -A 2 | grep gdb_expect"
found.
Tested on x86_64 Fedora 20, native and gdbserver.
gdb/testsuite/
2014-09-12 Pedro Alves <palves@redhat.com>
* gdb.arch/gdb1558.exp: Replace uses of gdb_expect after
gdb_run_cmd with gdb_test_multiple or gdb_test throughout.
* gdb.arch/i386-size-overlap.exp: Likewise.
* gdb.arch/i386-size.exp: Likewise.
* gdb.arch/i386-unwind.exp: Likewise.
* gdb.base/a2-run.exp: Likewise.
* gdb.base/break.exp: Likewise.
* gdb.base/charset.exp: Likewise.
* gdb.base/chng-syms.exp: Likewise.
* gdb.base/commands.exp: Likewise.
* gdb.base/dbx.exp: Likewise.
* gdb.base/find.exp: Likewise.
* gdb.base/funcargs.exp: Likewise.
* gdb.base/jit-simple.exp: Likewise.
* gdb.base/reread.exp: Likewise.
* gdb.base/sepdebug.exp: Likewise.
* gdb.base/step-bt.exp: Likewise.
* gdb.cp/mb-inline.exp: Likewise.
* gdb.cp/mb-templates.exp: Likewise.
* gdb.objc/basicclass.exp: Likewise.
* gdb.threads/killed.exp: Likewise.
Two modifications:
1. The addition of 2013 to the copyright year range for every file;
2. The use of a single year range, instead of potentially multiple
year ranges, as approved by the FSF.
* gdb.base/callfuncs.exp: Make all test names unique.
* gdb.base/commands.exp: Make all test names unique.
* gdb.base/condbreak.exp: Make all test names unique.
* gdb.base/dbx.exp: Make all test names unique.
* gdb.base/default.exp: Make all test names unique.
* gdb.base/define.exp: Make all test names unique. Conform some FAIL
and TIMEOUT messages to their corresponding PASS message.
* gdb.base/ending-run.exp: Make all test names unique.
* gdb.base/long_long.exp: Remove duplicate test.