Loading .gdbinit from current directory fails with "auto-loading has been declined by your `auto-load safe-path'"

See http://sourceware.org/gdb/current/onlinedocs/gdb/Startup.html#Init%20File%20in%20the%20Current%20Directory%20during%20Startup

Basically, what you want is to allow loading the per-directory .gdbinit from your ~/.gdbinit. If you are not worried about the security aspects, then this works:

set auto-load safe-path .

Or, if that doesn't cut it for some reason, you can also allow loading the .gdbinit from anywhere on the system:

set auto-load safe-path /

Tags:

Gdb

Gdbinit