Reputation: 4545
I am running gdb from inside emacs and am looking for an automatic way to specify the source directories in my .emacs file. Basically, it is becoming a pain to always specify the source file directories for gdb :)
Upvotes: 0
Views: 182
Reputation: 13924
You can customize GUD GDB's command-line. Unfortunately, this is a global setting, and not something per-buffer/-project…
M-x customize-apropos gud
(or navigate to Customize group Emacs/Programming/Tools/Gud)
Look for Gud Gdb Command Name and set it to something like
gdb --annotate=3 -d /usr/src/whatever -d ~/more/src
(The --annotate=3
is required for GUD to work properly.)
Upvotes: 2