This commit:
commit
3df8c6afdd6d38a7622ff5f4b1a64aff80334ab9
Date: Fri Nov 27 10:46:07 2020 +0000
gdb: fix potentially uninitialised variable
Was pushed with no test. Naughty!
The new test checks how GDB behaves when completing an invalid /FMT
string.
Currently GDB does no validation of the /FMT string during tab
completion, and just assumes that any /FMT string is valid and
complete when the user hits TAB. So:
(gdb) p/@@<TAB>
Will give:
(gdb) p/@@ <CURSOR IS HERE>
We already had a test in place for completion on a valid /FMT string,
but the above commit fixed a bug in the logic for completing invalid
/FMT strings. Now we have a test for this too.
gdb/testsuite/ChangeLog:
* gdb.base/completion.exp: Add a new test.
+2021-01-08 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gdb.base/completion.exp: Add a new test.
+
2021-01-08 Andrew Burgess <andrew.burgess@embecosm.com>
* gdb.fortran/intvar-dynamic-types.exp: New file.
test_gdb_complete_none "p${spc}/"
test_gdb_complete_unique "p${spc}/d" "p${spc}/d"
+ # Try completion on an invalid /FMT string. GDB doesn't attempt
+ # to validate the /FMT string during completion, the string is
+ # just assumed to be complete when the user hits TAB.
+ test_gdb_complete_unique "p${spc}/@" "p${spc}/@"
+
test_gdb_complete_unique "x${spc}/1w values\[0\].b"\
"x${spc}/1w values\[0\].b_field"