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
Asked
Active
Viewed 4.3k times
5 Answers
24
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.
coanor
- 3,526
- 4
- 43
- 63
23
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.
Panshul
- 936
- 1
- 8
- 24
-
Thanks now I have the .gdbinit file in my home directory. Where can I locate the crash result? – saman01 Mar 06 '12 at 10:56
-
You can add this system default to your .gdbinit to log Xcode's GDB output to a file. So when you execute your program, your logs will be written to the log file: defaults write com.apple.dt.Xcode IDEGDBLogToFile /tmp/logs.txt – Panshul Mar 06 '12 at 16:33
2
You may want to add the line echo "set disassembly intel" > ~/.gdbinit. For example:
gdb@Name:~$ echo "set disassembly intel" > ~/.gdbinit
gdb@Name:~$ cat ~/.gdbinit
set disassembly intel
gdb@Name:
Rubens
- 13,978
- 10
- 59
- 92
user2651290
- 21
- 1