diff options
author | Pedro Alves <palves@redhat.com> | 2019-06-13 00:06:53 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2019-06-13 00:20:08 +0100 |
commit | 90a1ef8762a57f3f57007db2186099c026152034 (patch) | |
tree | 1ae652fcbc0961b5e0c0a4ecf561c9360bd2626e /gdb/testsuite | |
parent | d4c16835cad70bd8c04ff30d5d6f40ac65e7f7e1 (diff) | |
download | fsf-binutils-gdb-90a1ef8762a57f3f57007db2186099c026152034.zip fsf-binutils-gdb-90a1ef8762a57f3f57007db2186099c026152034.tar.gz fsf-binutils-gdb-90a1ef8762a57f3f57007db2186099c026152034.tar.bz2 |
"backtrace full/no-filters/hide" completer
"backtrace"'s completer now completes on command options:
(gdb) bt -[TAB]
-entry-values -full -no-filters -past-main
-frame-arguments -hide -past-entry -raw-frame-arguments
But it doesn't know how to complete on qualifiers:
(gdb) bt fu[TAB]
funlockfile futimens futimes.c
funlockfile.c futimens.c futimesat
futex-internal.h futimes futimesat.c
This commit fixes that:
(gdb) bt fu[TAB]ll
(gdb) bt n[TAB]o-filters
(gdb) bt h[TAB]ide
I considered teaching the gdb::option framework to handle non-'-'
options, but decided it wasn't worth it for this special case, and I'd
rather not make it easy to add new qualifier-like options.
gdb/ChangeLog:
2019-06-13 Pedro Alves <palves@redhat.com>
* stack.c (parse_backtrace_qualifiers): New.
(backtrace_command): Use it.
(backtrace_command_completer): Complete on qualifiers.
gdb/testsuite/ChangeLog:
2019-06-13 Pedro Alves <palves@redhat.com>
* gdb.base/options.exp (test-backtrace): Test completing qualifiers.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/options.exp | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4485f29..d2063f2 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2019-06-13 Pedro Alves <palves@redhat.com> + * gdb.base/options.exp (test-backtrace): Test completing qualifiers. + +2019-06-13 Pedro Alves <palves@redhat.com> + * gdb.base/options.exp (test-backtrace): New. (top level): Call it. diff --git a/gdb/testsuite/gdb.base/options.exp b/gdb/testsuite/gdb.base/options.exp index 1757346..5a35074 100644 --- a/gdb/testsuite/gdb.base/options.exp +++ b/gdb/testsuite/gdb.base/options.exp @@ -256,6 +256,17 @@ proc_with_prefix test-backtrace {} { "-raw-frame-arguments" } + # Test that we complete the qualifiers, if there's any. + test_gdb_complete_unique \ + "backtrace ful" \ + "backtrace full" + test_gdb_complete_unique \ + "backtrace hid" \ + "backtrace hide" + test_gdb_complete_unique \ + "backtrace no-fil" \ + "backtrace no-filters" + global binfile clean_restart $binfile |