[RFA] Make sym_read routines handle separate debug files

Tom Tromey tromey@redhat.com
Mon Dec 7 20:13:00 GMT 2009

>>>>> "Tristan" == Tristan Gingold <gingold@adacore.com> writes:

>> Could we not just keep the existing logic as a format-independent
>> fallback?

Tristan> I was hesitant to do that given that only ELF and some COFF
Tristan> support .gnu_debuglink.

I see.

After I sent my note, I wondered about folks doing something like
building an ELF executable, objcopy'ing it to some other format for
running it, but continuing to use the ELF for debugging.  Do people do

If so then that would be a situation where the primary objfile could be
of any type, but still have separate debug info.

If not, then I agree your change is safe.

Tristan> +      debugfile = find_separate_debug_file_by_buildid (objfile);

>> If this is only meaningful for ELF, as it seems to be, then it seems we
>> might as well put it in elfread.c.

Tristan> To be honest, I reserved this move for a following patch.  Do
Tristan> you prefer I resubmit this patch with this change ?

If it is coming later, then I don't mind, do whatever is most


More information about the Gdb-patches mailing list