Re: Using separate debug info files with Windows DLLs

Tom Tromey <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
>>>>> "Eli" == Eli Zaretskii <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.