emacs-devel
[Top][All Lists]
Advanced

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

gud-chdir-before-run


From: Eli Zaretskii
Subject: gud-chdir-before-run
Date: Wed, 03 Mar 2010 05:25:11 -0500

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.

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.

But my main problem with this default is that the effect is different
for the same command line, depending on whether you invoke GDB from the
shell prompt or via "M-x gdb RET".

Of course, customizing the option to nil is easy enough, but if there
are no important use-cases where it does TRT, perhaps we should consider
changing the default.  Or maybe we should dynamically decide whether to
chdir or not, depending on whether the executable mentioned in the GDB
command line is in the same directory as the current buffer.




reply via email to

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