我希望默认情况下在 regs 布局中打开 gdb tui。有没有办法在 ~/.gdbinit
或其他配置文件中进行设置?
最佳答案
你可以在~/.gdbinit
中放入任何你想要的gdb命令,包括layout reg
。这就是我的。
set disassembly-flavor intel
layout reg
set print static-members off
set print pretty on
macro define offsetof(t, f) &((t *) 0)->f) # https://stackoverflow.com/questions/1768620/how-do-i-show-what-fields-a-struct-has-in-gdb#comment78715348_1770422
(另请参阅 the bottom of the x86 tag wiki 了解更多 gdb/asm 调试技巧)。
关于assembly - 在 .gdbinit 中设置默认 TUI 布局?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49800774/