Re: Using separate debug info files with Windows DLLs
Eli Zaretskii <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
> From: Tom Tromey <[email protected]> > Cc: [email protected] > Date: Sun, 19 Aug 2018 10:40:34 -0600 > > >>>>> "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)) > { > [...] Thanks, I will try to use this some time. > I wonder if the build-id approach could be extended to COFF somehow. That would be nice, yes.