This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] build-id .debug files load (like .gnu_debuglink)
- From: Roland McGrath <roland at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 25 Aug 2007 15:48:07 -0700 (PDT)
- Subject: Re: [patch] build-id .debug files load (like .gnu_debuglink)
> This part may be questionable:
> - debugfile = find_separate_debug_file (objfile);
> + /* If the file has its own symbol tables it has no separate debug info. */
> + if (objfile->psymtabs == NULL)
> + debugfile = find_separate_debug_file (objfile);
As Daniel mentioned, this is certainly not correct. The main file might
have a symbol table, but not have any debug info (i.e. DWARF sections).
The condition I would use is the direct one: if the main file has no DWARF
sections, then look for a separate debug file.
> So far .gnu_debuglink existed only in the main file (not the .debug file) and
> it existed only if the debug info was stripped to a separate file from it.
This is still true. It's not entirely unreasonable to use presence of
.gnu_debuglink as the sign that you should look for separate debug info,
even if for the actual searching you ignore its contents when you have a
build ID note.
Thanks,
Roland