GDB: How to add a key combination which runs a command?

让人想犯罪 __ 提交于 2019-12-06 15:05:33

I am not a TUI user, but my understanding is that the TUI has two modes.

In its initial (normal) mode, it uses readline like the ordinary gdb CLI. Readline provides a way to rebind keys via ~/.inputrc. The main thing you need to know here is that gdb is, sensibly enough, called "gdb" for readline's purposes. So a binding might look like:

$if gdb
"\C-u": "up\n"
$endif

The TUI also has a "single key" mode. As far as I know, this mode doesn't use readline and there is no way to rebind keys. However, in this mode, "u" and "d" are already bound the way you'd like.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!