ios .gdbinit 位于何处,我该如何编辑它?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9573683/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where is .gdbinit is located and how can I edit it?
提问by saman01
I am having a exception crash issue and I am trying to edit this file to get more info about the crash. Where is .gdbinit is located and how can I edit it? Thanks
我遇到异常崩溃问题,我正在尝试编辑此文件以获取有关崩溃的更多信息。.gdbinit 位于何处,我该如何编辑它?谢谢
回答by coanor
You can also put .gdbinit
in your debugging folder, this makes more applicable for debugging different apps. GDB will automatically load ./.gdbinit
for current debugging.
您也可以放入.gdbinit
您的调试文件夹,这更适用于调试不同的应用程序。GDB 将自动加载./.gdbinit
以进行当前调试。
回答by Panshul
You need to create a new file called .gdbinit - put it in your home directory. Now every time gdb starts it will execute the commands in this file. ".gdbinit" is a file you can drop in your home directory that gdb will parse when gdb launches, either from the command line or from within Xcode.
您需要创建一个名为 .gdbinit 的新文件 - 将其放在您的主目录中。现在每次 gdb 启动时,它都会执行这个文件中的命令。“.gdbinit”是一个可以放在主目录中的文件,gdb 将在 gdb 启动时解析该文件,无论是从命令行还是从 Xcode 中。
回答by user2651290
You may want to add the line echo "set disassembly intel" > ~/.gdbinit
. For example:
您可能想要添加该行echo "set disassembly intel" > ~/.gdbinit
。例如:
gdb@Name:~$ echo "set disassembly intel" > ~/.gdbinit
gdb@Name:~$ cat ~/.gdbinit
set disassembly intel
gdb@Name:
回答by willis
You can do
你可以做
nano ~/.gdbinit
modify your file and save it. Verify the changes with cat ~/.gdbinit
修改您的文件并保存。验证更改cat ~/.gdbinit
回答by fizzbuzz
go to the root directory using cd ~/ or cd root, then create .gdbinit
使用 cd ~/ 或 cd root 进入根目录,然后创建 .gdbinit