[patch] build-id .debug files load (like .gnu_debuglink)

Roland McGrath roland@redhat.com
Sat Aug 25 22:48:00 GMT 2007


> 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



More information about the Gdb-patches mailing list