emacs-devel
[Top][All Lists]
Advanced

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

Re: gud-chdir-before-run


From: Andreas Schwab
Subject: Re: gud-chdir-before-run
Date: Wed, 03 Mar 2010 18:01:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> Why is this option's default value non-nil?  It does the wrong thing
> when the executable is not in the same directory as the sources, because
> the .gdbinit file is usually found where the sources live, so changing
> the directory starts GDB in the wrong place, and .gdbinit is not read.

Usually the .gdbinit lives where the program is built.

> In my usage, I normally type "M-x gdb" from a buffer that visits some
> source file which is compiled into the program I'm about to debug, or
> one of its Makefile's or other scripts.  For this use-case, the current
> default is always wrong.

Without gud-chdir-before-run you need to M-x cd to the build directory
*before* invoking M-x gdb, which would clobber default-directory for the
current buffer.

Alternatively there should be an easy way to do M-x in a different
default-directory then the one from the current buffer.

Andreas.

-- 
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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