TUI single key mode: how to customize a key?
Tom Tromey
tom@tromey.com
Fri Oct 25 14:19:00 GMT 2019
>>>>> "Luis" == Luis Machado <luis.machado@linaro.org> writes:
Luis> No. Unfortunately the keys are hardcoded in gdb/tui/tui.c:
Luis> static const struct tui_char_command tui_commands[] = {
Luis> { 'c', "continue" },
Luis> { 'd', "down" },
Luis> { 'f', "finish" },
Luis> { 'n', "next" },
Luis> { 'o', "nexti" },
Luis> { 'r', "run" },
Luis> { 's', "step" },
Luis> { 'i', "stepi" },
Luis> { 'u', "up" },
Luis> { 'v', "info locals" },
Luis> { 'w', "where" },
Luis> { 0, 0 },
Luis> };
Luis> I don't see a problem with making those configurable. Feel free to
Luis> send a patch for it or a design idea so we can make this work.
Actually, I implemented this a short time ago.
You have to use a gdb that is built against Readline 8.0.
See:
commit 11061048d1fed4465b0e62eb3c14dabf0beab59b
Author: Tom Tromey <tom@tromey.com>
Date: Tue Sep 10 17:25:35 2019 -0600
Give a name to the TUI SingleKey keymap
Readline 8.0 has a feature that lets an application name a keymap.
This in turn makes it simpler for users to bind keys in keymaps in
their .inputrc.
This patch gives a name to the TUI SingleKey keymap, so that
additional bindings can be made there. For example:
$if gdb
set keymap SingleKey
"X": "echo hello\\n\n"
$endif
Tom
More information about the Gdb
mailing list