GDB version settings for emacs

I am using emacs version 23.1 to debug C / C ++. GDB version, this version of emacs chooses by default: 5.2.1. I would like to use GDB version 7.0.

I tried the following options: -

  • Make an alias (in ~ / .alias) for gdb to the desired gdb location (i.e. the location of gdb version 7.0.)

  • Add the line (setq gdb-command-name "/ grid / common / bin / gdb") to the ~ / .emacs file.

Both of these options do not work. Can anybody help?

+5
source share
3 answers

rob, , . dicroce gdb-command-name gud-gdb-command-name, . , .emacs:

; Attempt to reassign the default gdb command to point to gdb64
(setq gud-gdb-command-name "/apps/gdb64/bin/gdb --annotate=3")
+6

:

(defvar gud-gdb-command-name "arm-none-linux-gnueabi-gdb")
(setq gud-gdb-command-name "arm-none-linux-gnueabi-gdb --annotate=3")

defvar .

+1

Have you tried setting your PATH so that the desired gdb is first found (before emacs started, of course)? (by the way, I don’t even see the variable "gdb-command-name").

0
source

All Articles