This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug win32/14527] New: warning: section .gnu_debuglink not found inMODULENAME.debug
- From: "lrn1986 at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 28 Aug 2012 16:53:23 +0000
- Subject: [Bug win32/14527] New: warning: section .gnu_debuglink not found inMODULENAME.debug
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=14527
Bug #: 14527
Summary: warning: section .gnu_debuglink not found in
MODULENAME.debug
Product: gdb
Version: 7.5
Status: NEW
Severity: minor
Priority: P2
Component: win32
AssignedTo: unassigned@sourceware.org
ReportedBy: lrn1986@gmail.com
Classification: Unclassified
Run this:
gcc -g ./test.c -o ./test.exe
objcopy --only-keep-debug ./test.exe ./test.exe.dbg
objcopy --strip-debug ./test.exe
objcopy --add-gnu-debuglink="test.exe.dbg" ./test.exe
gdb -ex r -ex q --return-child-result ./test.exe
test.c:
#include <stdio.h>
int main (int argc, char **argv)
{
printf ("Hello, World!\n");
return 0;
}
gdb (7.5 from mingw.org) will say:
Reading symbols from PATH_TO\test.exe...Reading symbols from
PATH_TO\test.exe.dbg...
warning: section .gnu_debuglink not found in PATH_TO\test.exe.dbg
done.
done.
Why does gdb warn me about the lack of debuglink in a file with full debug info
(the test.exe.dbg file)? It's not supposed to have that section.
This can be worked around by doing the following:
objcopy --only-keep-debug ./test.exe ./test.exe.dbg
objcopy --add-gnu-debuglink="test.exe.dbg" ./test.exe
objcopy --only-keep-debug ./test.exe ./test.exe.dbg
objcopy --remove-section=.gnu_debuglink ./test.exe
objcopy --strip-debug ./test.exe
objcopy --add-gnu-debuglink="test.exe.dbg" ./test.exe
This way test.exe.gbg file gets a .gnu_debuglink section (doesn't matter where
it's pointing), and its contents pass the CRC32 check
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.