I use emacs version 23.1 for C/C++ debugging. The GDB version this version of emacs picks by default is 5.2.1. I would like to use GDB version 7.0.
I have tried the following options :-
Make an Alias(in ~/.alias) for gdb to the desired location of gdb (ie. location of gdb version 7.0.)
Add the line (setq gdb-command-name "/grid/common/bin/gdb") to the ~/.emacs file.
Both the above options don't work. Can anyone please help ?
Emacs provides a special interface to GDB, which uses extra Emacs windows to display the state of the debugged program. See GDB Graphical Interface. Emacs also has a built-in debugger for Emacs Lisp programs.
The Grand Unified Debugger, or GUD for short, is an Emacs major mode for debugging. It works on top of command line debuggers. GUD handles interaction with gdb, dbx, xdb, sdb, perldb, jdb, and pdb, by default.
rob, I tried your 2nd option as well, but it didn't work. I then took a suggestion from dicroce and just changed the variable from gdb-command-name to gud-gdb-command-name and that did it. So here's what I put in my .emacs file:
; Attempt to reassign the default gdb command to point to gdb64
(setq gud-gdb-command-name "/apps/gdb64/bin/gdb --annotate=3")
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