Add tab completion for TUI's "focus" command
authorPatrick Palka <patrick@parcs.ath.cx>
Mon, 22 Jun 2015 02:54:10 +0000 (22:54 -0400)
committerPatrick Palka <patrick@parcs.ath.cx>
Fri, 26 Jun 2015 14:11:28 +0000 (10:11 -0400)
commit2e52ae68e7cedc3a1f9908c98ee60a8602705835
treea5cf504057eace75c9b3eea3adaa7ab0a8f6e41b
parent6e22494e5076e4d3c0b2c2785883162f83db499e
Add tab completion for TUI's "focus" command

The implementation is pretty straightforward, with the only caveat being
that the "src", "cmd", "next" and "prev" entries get delibrately added
to the completion list even when the TUI has not yet been initialized
(i.e. has never been enabled during the session), since invoking the
"focus" command with these arguments already works when the TUI has not
yet been initialized.

gdb/ChangeLog:

* tui/tui-win.c (focus_completer): New static function.
(_initialize_tui_win): Set the completion function of the
"focus" command to focus_completer.

gdb/testsuite/ChangeLog:

* gdb.base/completion.exp: Test the completion of the "focus"
command.
gdb/ChangeLog
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/completion.exp
gdb/tui/tui-win.c