Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经为我的 ~/.gdbinit 设置了一些用于特定配置的命令。
有时我想启动 gdb 以忽略 .gdbinit。
是否有一种机制可以忽略 .gdbinit 或被另一个 .gdbinit 覆盖?
运行 GDB
gdb -nx
这会跳过.gdbinit文件处理。
.gdbinit
根据GDB 文档,初始化文件你想跳过你的“主目录早期初始化文件”,这样做是用-nh.
-nh
接受的答案-nx还禁用“系统范围的初始化文件”和“本地目录初始化文件”。
-nx