Warning when using separate debug info file

Eli Zaretskii eliz@gnu.org
Wed Apr 17 17:37:00 GMT 2019


I tried debugging a program on MS-Windows after moving the debug info
to a separate file:

  objcopy --only-keep-debug e.exe e.debug
  strip -g e.exe
  objcopy --add-gnu-debuglink=e.debug e.exe

When I then invoke GDB, it does find the symbols, but emits a warning:

  Reading symbols from ./e.exe...Reading symbols from d:\foo\bar\e.debug...
  warning: section .gnu_debuglink not found in d:\foo\bar\e.debug

Why does it look for .gnu_debuglink in the debug info file?  That
section is in the executable file, and evidently GDB does find and
read it correctly, because it reads symbols from e.debug.

Is this somehow specific to Windows?  Does anyone have an idea what is
going on here?

TIA



More information about the Gdb-patches mailing list