I have several options that I set every time I open GDB, for instance:
set print thread-events off
Is there a way to set these options by default, perhaps something like a .gdb_rc file?
The initialization file for gdb
is called .gdbinit
. You can put your desired options in this file. They'll be automatically executed during gdb's startup.
Example content:
# set command line argument to "2"
set args 2
You may put the .gdbinit
file into your $HOME or current directory. The latter overrides the settings in the global $HOME/.gdbinit
file.
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