And should it be called .gdbinit
or gdb.ini
?
I thought that I would try this file.
I am testing with Vectorcast, which uses MinGw. I copied the file with both names (.gdbinit
and gdb.ini
) to both the Vectorcast directory and it's MinGW bin
directory, where gdb.exe
is, as I was unsure which is the current working directory
, but don't see anything which I would expect from that file.
So, where should I put it, and what should I call it?
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.
GDB User Initialization File The user initialization file contains commands that are executed upon the startup of GDB. It is located in your home directory under the path: ~/. gdbinit.
You should put it into your $HOME
directory or into current directory, see How do I load .gdbinit on gdb startup?.
You can know your home directory from gdb shell with either
(gdb) show environment HOME
or
(gdb) shell echo $HOME
You can know current directory with
(gdb) shell pwd
And should it be called .gdbini or gdb.ini?
No, it should be called .gdbinit
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With