aboutsummaryrefslogtreecommitdiff
path: root/gdb/arc-linux-tdep.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-11-16 11:36:56 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-11-17 10:01:11 +0000
commit037d7135de575c9e0c20e9158c105979bfee339c (patch)
tree78dacfb3bfcbbdd11b0a2de7646fcc85ff9d5ca3 /gdb/arc-linux-tdep.c
parent0bfc584f6630cba3d7bbaab80517e0936ed8a113 (diff)
downloadgdb-037d7135de575c9e0c20e9158c105979bfee339c.zip
gdb-037d7135de575c9e0c20e9158c105979bfee339c.tar.gz
gdb-037d7135de575c9e0c20e9158c105979bfee339c.tar.bz2
gdb: improve command completion for 'print', 'x', and 'display'
The /FMT specification on the print command currently breaks command completion, so: (gdb) p var.<TAB><TAB> .... list of fields in var ..... But, (gdb) p/d var.<TAB><TAB> ..... list of all symbols ..... After this commit this issue is now resolved. There are some other details around tab-completion and /FMT which hopefully this commit improves. So, before: (gdb) p/<TAB><TAB> .... lists all symbols ..... After: (gdb) p/<TAB><TAB> # Nothing changes... The thinking here is that after a / the user must type a FMT, but we don't offer tab completion on FMT characters. Placing a symbol directly after a / will not do what the user expects, so offering that seems wrong. Similarly, before we had: (gdb) p/d<TAB><TAB> ... lists all symbols starting with 'd' .... But afterwards: (gdb) p/d<TAB><TAB> # Adds a single space, so we get: (gdb) p/d <CURSOR> As before, typing a symbol where FMT is expected will not do what the user expects. If the user has added a FMT string then upon tab completion GDB assumes the FMT string is complete and prepares the user to type an expression. In this commit I have also added completion functions for the 'x' and 'display' commands. These commands also support /FMT specifiers and so share some code with 'print'. gdb/ChangeLog: * printcmd.c: Include 'safe-ctype.c'. (skip_over_slash_fmt): New function. (print_command_completer): Call skip_over_slash_fmt. (display_and_x_command_completer): New function. (_initialize_printcmd): Add command completion for 'x' and 'display'. gdb/testsuite/ChangeLog: * gdb.base/completion.exp: Add new tests.
Diffstat (limited to 'gdb/arc-linux-tdep.c')
0 files changed, 0 insertions, 0 deletions