http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308
Summary: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassig...@gcc.gnu.org ReportedBy: pl...@agmk.net Created attachment 22975 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22975 testcase. mingw testcase: main.cpp: #include <stdexcept> #include <cstdio> #include <cstdlib> #include <windows.h> #include <winbase.h> ::LONG CALLBACK vectoredExceptionHandler( ::PEXCEPTION_POINTERS ep ) { std::printf( "entering vectorized ex. handler 0x%lx...\n", ep->ExceptionRecord->ExceptionCode ); return EXCEPTION_CONTINUE_SEARCH; } ::LONG WINAPI unhandledExecptionFilter( ::PEXCEPTION_POINTERS ep ) { std::printf( "entering unhandled ex. filter 0x%lx...\n", ep->ExceptionRecord->ExceptionCode ); return EXCEPTION_EXECUTE_HANDLER; // should terminate process. } int main() { ::AddVectoredExceptionHandler( 1, vectoredExceptionHandler ); ::SetUnhandledExceptionFilter( unhandledExecptionFilter ); try { int i = 42; std::printf( "throwing int %d...\n", i ); throw i; } catch ( int i ) { std::printf( "catching int %d...\n", i ); } volatile int* p = 0; std::printf( "accessing null pointer...\n" ); *p = 0; return 0; } makefile: CXXFLAGS := -Wall -gdwarf-2 -g2 -fdwarf2-cfi-asm --save-temps all: main.cpp /local/devel/toolchain46/x86_64-pc-mingw32/bin/x86_64-pc-mingw32-g++ $(CXXFLAGS) main.cpp -o main64.exe && mv main.s main64.s clean: rm -f *.exe D:\>mingw64\bin\gdb.exe main64.exe GNU gdb (GDB) 7.1.90.20100730-cvs Copyright (C) 2010 Free Software Foundation, Inc. (...) Breakpoint 1, main () at main.cpp:21 21 in main.cpp (gdb) disassemble Dump of assembler code for function main(): => 0x00000000004015ac <+0>: push %rbp 0x00000000004015ad <+1>: push %r15 0x00000000004015af <+3>: push %r14 0x00000000004015b1 <+5>: push %r13 0x00000000004015b3 <+7>: push %r12 0x00000000004015b5 <+9>: push %rdi 0x00000000004015b6 <+10>: push %rsi 0x00000000004015b7 <+11>: push %rbx 0x00000000004015b8 <+12>: sub $0x158,%rsp 0x00000000004015bf <+19>: lea 0x80(%rsp),%rbp 0x00000000004015c7 <+27>: movaps %xmm6,0x30(%rbp) 0x00000000004015cb <+31>: movaps %xmm7,0x40(%rbp) 0x00000000004015cf <+35>: movaps %xmm8,0x50(%rbp) 0x00000000004015d4 <+40>: movaps %xmm9,0x60(%rbp) 0x00000000004015d9 <+45>: movaps %xmm10,0x70(%rbp) 0x00000000004015de <+50>: movaps %xmm11,0x80(%rbp) 0x00000000004015e6 <+58>: movaps %xmm12,0x90(%rbp) 0x00000000004015ee <+66>: movaps %xmm13,0xa0(%rbp) 0x00000000004015f6 <+74>: movaps %xmm14,0xb0(%rbp) 0x00000000004015fe <+82>: movaps %xmm15,0xc0(%rbp) 0x0000000000401606 <+90>: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] iirc the gcc-4.5 generates correct debuginfo.