This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][RFC] symfile.c:find_separate_debug_file: additional path

Hi Tom,

I played with the build-ids for a bit, and I should be able to solve
my problem using them. (It is true that I will have to move some files
around, but with build-ids the location of the debug file is
independent of the location of the executable, which makes things a
bit easier).

Anyway, thanks for mentioning the build-ids.

As for the extra search path I came with the following pros and cons:
- It would make it easier to set up an environment where gdb
automatically finds and loads debug information.
- All current instances of automatic loading would still work (for
this to happen the new path must be the last place where gdb looks for
debug files, this would require a small modification to my patch).
- In some edge cases it might be the only cost-effective way to make
automatic loading possible.

- It would promote the bad practice of always leaving the debug files
in the root of some debug file directory, which would lead to
collisions (i.e. two apps try to store their "server.debug" file on
the same directory) and shadowing (i.e. the file
/usr/local/app1/debug/server.debug shadows the file

I am a bit on the fence about this. (Especially after learning about build-ids.)
At any rate, if someone expresses some interest on this feature I
would be glad to submit an improved patch for consideration (with the
appropriate modifications to the documentation).

Best Regards,
Tiago Queiroz

On Fri, Nov 1, 2013 at 8:52 PM, Tom Tromey <> wrote:
>>>>>> "Tiago" == Tiago  <> writes:
> Tiago> Recently I added a directory with debug symbols to the
> Tiago> "debug-file-directory" variable in .gdbinit, expecting that gdb would
> Tiago> search for the debug file mentioned in the ".gnu_debuglink" section in
> Tiago> this directory. That is not the case.
> Yeah.  This way is contrary to the gdb documentation of the feature.
> Tiago> Is there an easier way to obtain the desirable behaviour? (note that I
> Tiago> cannot change the location of binaries or debug symbols. I can only
> Tiago> change .gdbinit, the .gnu_debuglink section of the binaries and gdb)
> Tiago> Is this patch suitable for the main repo?
> What system is this that can't be changed?  I think it would be
> preferable to make your system work the way it is all documented to
> work.
> Though, really, you should be using build-ids and not this stuff anyway.
> In any case this patch needs a documentation fix before it could be
> considered.  I suppose I'm mildly against it, on the theory that the
> existing mechanisms are documented and sufficient.
> Tom

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]