This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH][RFC] symfile.c:find_separate_debug_file: additional path
- From: Tiago Queiroz <tiagofaq at gmail dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 3 Nov 2013 14:15:43 +0000
- Subject: Re: [PATCH][RFC] symfile.c:find_separate_debug_file: additional path
- Authentication-results: sourceware.org; auth=none
- References: <5273E882 dot 5000304 at gmail dot com> <8738nfyhdu dot fsf at fleche dot redhat dot com>
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
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).
On Fri, Nov 1, 2013 at 8:52 PM, Tom Tromey <firstname.lastname@example.org> wrote:
>>>>>> "Tiago" == Tiago <email@example.com> 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
> 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.