assembly - 在 .gdbinit 中设置默认 TUI 布局?

标签 assembly gdb

我希望默认情况下在 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/

相关文章:

windows - Microsoft Stack 是否始终与 16 字节对齐?

c - 为什么 gdb 看不到 `stdio` 何时更改?

c++ - CLion STL 容器无法在 Fedora 23 上的调试器中正确显示

c - 需要说明汇编器和Linux信号处理的用法

assembly - 相对跳转超出范围 0020h 字节

assembly - 编写 shellcode : why my shellcode won't work?

assembly - 如何在 x86 程序集中将字符从一个内存位置复制到另一个内存位置?

c - gdb单步调试C程序

c - 有用于 zOS 的 C 调试器吗?

linux - 通过gdb手动唤醒epoll_wait?