[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#58826: 29.0.50; gud-gdb can't find core file if executable is in a d
From: |
Eli Zaretskii |
Subject: |
bug#58826: 29.0.50; gud-gdb can't find core file if executable is in a different directory |
Date: |
Thu, 29 Dec 2022 08:19:58 +0200 |
> From: Richard Stallman <rms@gnu.org>
> Cc: stefankangas@gmail.com, 58826@debbugs.gnu.org,
> dima@secretsauce.net
> Date: Wed, 28 Dec 2022 22:14:14 -0500
>
> > Telling GDB to chdir to another directory will not affect the
> > default-directory of the *gud-FILE* buffer, and that was the OP's problem:
> > the fact that typing a relative file name was interpreted relative to a
> > directory he didn't expect.
>
> It must be Emacs Lisp code that creates the *gud-FILE* buffer
> and handles these relative file name. Can't that code be changed
> to DTRT?
The argument here, and the original problem, is about what is "TRT".
For some (many) use cases, what the code does now is already TRT. I
attempted to explain that up-thread:
IME, the current behavior covers most of the use cases: either you are
debugging a program you are developing from its source tree, or you
are debugging an installed program that's on PATH.
> It's also really unintuitive to have an implicit change of directory
> here, and it would match most people's expectations if it was changed, I
> think. Do you know why we're doing that?
If you think about that, it's actually quite natural: it makes the
files you are likely to access from the debug session appear in the
current directory.
In any case, this is a long-standing behavior.