This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/20645] New: Build with "-fdebug-types-section" -> Dwarf Error: wrong version in compilation unit header
- From: "internet at 123gen dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 28 Sep 2016 14:41:58 +0000
- Subject: [Bug gdb/20645] New: Build with "-fdebug-types-section" -> Dwarf Error: wrong version in compilation unit header
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=20645
Bug ID: 20645
Summary: Build with "-fdebug-types-section" -> Dwarf Error:
wrong version in compilation unit header
Product: gdb
Version: 7.11.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: internet at 123gen dot com
Target Milestone: ---
Hello,
On Windows (MinGW / Cygwin), when I build a test program with GCC with the
"-fdebug-types-section" option, I cannot debug the resulting program in GDB,
which errors out with:
Reading symbols from test.exe...Dwarf Error: wrong version in compilation
unit header (is 1024, should be 2, 3, or 4) [in module /[...]/test.exe]
(the "1024" varies - sometimes "1", sometimes "0", depending on the source
program)
Tests:
- MinGW - GCC 6.2 & GDB 7.11.1 / 7.10: FAIL
- Cygwin - GCC 5.4 & GDB 7.10.1: FAIL
- Linux Mint - GCC 4.8 & GDB 7.7: SUCCESS
It is interesting this also fails on Cygwin; this leads me to believe this has
something to do with the way the ".debug_types" section is created or read from
in PE/COFF binaries (as opposed to ELF binaries, where it works fine).
I have verified I do in fact have a ".debug_types" section, and my homegrown
crash logger based on libdwarf <https://www.prevanders.net/dwarf.html> manages
to parse the debug data as usual (so it is of course far less strict than GDB).
I have no idea whether this is the right place to report this, nor which
component precisely is at fault.
Thanks for your help
Very basic repro:
- test.cpp:
#include <algorithm>
int main() { return 0; }
- g++ test.cpp -fdebug-types-section -g -o test.exe
- gdb test.exe
--
You are receiving this mail because:
You are on the CC list for the bug.