This is the mail archive of the gdb@sourceware.org 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: working with split debug files and sectionless ELFs


On Fri, 14 Oct 2011 17:38:30 +0200, Aleksandar Ristovski wrote:
> On 11-10-14 11:27 AM, Mike Frysinger wrote:
> > check out symfile.c:find_separate_debug_file_by_debuglink().  i hacked it locally
> > so that when get_debug_link_info() returns NULL, the code would fall back to
> > searching for the basename(argv[0]) + ".debug" of the ELF in question.  that
> > seemed to do what i want: "just work".
> 
> Ok, so the problem is that if debuglink is missing, gdb just gives up.
> 
> FWIW, what you are proposing makes sense to me. Maybe make it an
> optional behaviour?

The problem is the ".debug" extension is stored in .debug_link and it is not
assumed by GDB so far.  And for example Debian does not use it at all.

Using the ".debug" extension is too slow as the file needs to be checksummed
first.  One should use /usr/lib/debug/.build-id/ instead.  Still the argument
applies even /usr/lib/debug/.build-id/ is skipped without .debug_link.  But
for /usr/lib/debug/.build-id/ you do not need to assume any ".debug" suffix.


Thanks,
Jan


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