Using separate debug info files with Windows DLLs

Tom Tromey tom@tromey.com
Sun Aug 19 16:40:00 GMT 2018


>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

Eli> Does the "debug link" method work with Windows DLLs produces by MinGW
Eli> GCC and GNU Binutils?

I think so.

Eli> The "Separate Debug Files" node of the GDB manual talks only about
Eli> executables, and doesn't mention shared libraries.  If those methods
Eli> are supposed to work with shared libraries in general, and Windows
Eli> DLLs in particular, then I wonder (a) would the Windows loader live in
Eli> peace with the additional .gnu_debuglink section that needs to be put
Eli> there, and (b) when will GDB load the debug info using this method?

I don't know the answer to (a), but for (b), as far as I know,
coff_symfile_read is used for both executables and libraries; and at the
end of coff_symfile_read it has code to read the debug link and find the
separate debug file.  This is done if the main objfile doesn't have any
debug info:

  /* Try to add separate debug file if no symbols table found.   */
  if (!objfile_has_partial_symbols (objfile))
    {
[...]



I wonder if the build-id approach could be extended to COFF somehow.
build-ids are better because they don't require the slow CRC
computation.

Tom



More information about the Gdb mailing list