You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在.gdbinit或配置文件中设置GDB TUI默认regs布局?

How to Launch GDB TUI with Registers Layout by Default

Absolutely! You can set this up directly in your ~/.gdbinit configuration file—it’s totally straightforward. Here’s the step-by-step breakdown:

  • Open your ~/.gdbinit file with your preferred text editor (e.g., vim ~/.gdbinit or nano ~/.gdbinit). If the file doesn’t exist yet, just create a new one.
  • Add these two lines to the file:
    tui enable
    layout regs
    
    The first line turns on TUI mode by default, while the second sets the default layout to display registers alongside your code.
  • Save the file and exit the editor.

Next time you launch GDB, it will automatically start in TUI mode with the registers layout active. If you ever need to switch to a different layout temporarily (like source-only or assembly view), you can still use commands such as layout src or layout asm as usual.

内容的提问来源于stack exchange,提问作者StudentsTea

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 09:49:46