开发者

GDB version settings for emacs

I use emacs version 23.1 for C/C++ debuggi开发者_运维百科ng. 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 :-

  1. Make an Alias(in ~/.alias) for gdb to the desired location of gdb (ie. location of gdb version 7.0.)

  2. 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 ?


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")


This combination worked for me:

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

Without the defvar, it didn't work.


did you try setting up your PATH so that the gdb you want is the first one found (prior to starting emacs, of course)? (by the way, i don't even see a "gdb-command-name" variable).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜