[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gdb adds random filename to command

From: Kevin Rodgers
Subject: Re: gdb adds random filename to command
Date: Wed, 17 Jan 2007 23:41:36 -0700
User-agent: Thunderbird (Macintosh/20061207)

David L wrote:

> I loaded a lisp file like this "emacs -l foo.lisp" at the command line.
 > That file contained one line:
 > (setq gud-gdb-command-name "gdb --annotate=3 /tmp/foo")
 > When I tried to run gdb using M-x gdb, it added a random filename from
 > the working directory to the end of the gdb command like this:
 > gdb --annotate=3 foo randomfilename

That's because it tries now to guess the name of the executable that you
want to debug.

 > Although it's possible, I'm doing something wrong, the behavior is
 > different with older versions of emacs.

It looks like gud-gdb-command-name wasn't documented in earlier Emacsen but
it is now:

  Default command to execute an executable under the GDB debugger.

It's also mentioned in the Emacs manual now. I suggest that you leave it at
it's default value and type in the name of the executable.

I use makefiles for a project to open emacs with etags and a preconfigured
gud-gdb-command-name.  When using emacs as an IDE, this makes my life
easier... especially since in real life, my gud command has a filename
a lot more complicated than /tmp/foo:

gdb --annotate=3 /projects/dl/cvstrunk/shared/sw/gvu/bin/fc6debug1_singlethread/gvu

I don't like typing that long filename. If the new behavior is not a bug that will be fixed,
any suggestions for getting the old behavior?

Use environment variables for the directory and/or file name?

Kevin Rodgers
Denver, Colorado, USA

reply via email to

[Prev in Thread] Current Thread [Next in Thread]