June 2017
Intermediate to advanced
478 pages
13h 14m
English
There are some things that you need to do each time you run GDB, for example, setting the sysroot. It is convenient to put such commands into a command file and run them each time GDB is started. GDB reads commands from $HOME/.gdbinit, then from .gdbinit in the current directory, and then from files specified on the command line with the -x parameter. However, recent versions of GDB will refuse to load .gdbinit from the current directory for security reasons. You can override that behavior for by adding a line like this to your $HOME/.gdbinit:
set auto-load safe-path /
Alternatively, if you don't want to enable auto-loading globally, you can specify a particular directory like this:
add-auto-load-safe-path /home/chris/myprog ...
Read now
Unlock full access