public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
@ 2011-01-15 16:22 pluto at agmk dot net
  2011-01-15 16:38 ` [Bug debug/47308] " pluto at agmk dot net
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: pluto at agmk dot net @ 2011-01-15 16:22 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: pluto@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.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
@ 2011-01-15 16:38 ` pluto at agmk dot net
  2011-01-16  1:10 ` pluto at agmk dot net
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pluto at agmk dot net @ 2011-01-15 16:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

Pawel Sikora <pluto at agmk dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktietz at gcc dot gnu.org

--- Comment #1 from Pawel Sikora <pluto at agmk dot net> 2011-01-15 16:15:11 UTC ---
used software:

$ x86_64-pc-mingw32-g++ -v
Using built-in specs.
COLLECT_GCC=./x86_64-pc-mingw32-g++
COLLECT_LTO_WRAPPER=/local/devel/toolchain46/x86_64-pc-mingw32.host64/lib/gcc/x86_64-pc-mingw32/4.6.0/lto-wrapper
Target: x86_64-pc-mingw32
Configured with: ../configure --target=x86_64-pc-mingw32 --with-arch=core2
--prefix=/local/devel/toolchain46/x86_64-pc-mingw32.host64
--with-sysroot=/local/devel/toolchain46/x86_64-pc-mingw32.host64
--libdir=/local/devel/toolchain46/x86_64-pc-mingw32.host64/lib
--libexecdir=/local/devel/toolchain46/x86_64-pc-mingw32.host64/lib
--with-slibdir=/local/devel/toolchain46/x86_64-pc-mingw32.host64/lib
--with-gmp-include=/home/users/pluto/alatek/toolchain/trunk/gcc-math-runtime/include
--with-gmp-lib=/home/users/pluto/alatek/toolchain/trunk/gcc-math-runtime/lib
--with-mpfr-include=/home/users/pluto/alatek/toolchain/trunk/gcc-math-runtime/include
--with-mpfr-lib=/home/users/pluto/alatek/toolchain/trunk/gcc-math-runtime/lib
--with-mpc-include=/home/users/pluto/alatek/toolchain/trunk/gcc-math-runtime/include
--with-mpc-lib=/home/users/pluto/alatek/toolchain/trunk/gcc-math-runtime/lib
--disable-multilib --disable-nls --disable-libgomp --disable-libmudflap
--disable-libssp --enable-tls --enable-libstdcxx-allocator=mt
--enable-cxx-flags='-O2 -mcld -gdwarf-4 -g2' --disable-libstdcxx-pch
--disable-lto --disable-plugin --enable-c99 --enable-long-long
--disable-win32-registry --enable-threads=win32 --enable-sjlj-exceptions
--enable-shared --enable-fully-dynamic-string --enable-__cxa_atexit
--enable-languages=c,c++ --enable-checking=release --disable-symvers
--with-long-double-128 --disable-cld --disable-bootstrap
Thread model: win32
gcc version 4.6.0 20110113 (experimental) (GCC)

$ ./x86_64-pc-mingw32-as --version
GNU assembler (Linux/GNU Binutils) 2.21.51.0.5.20110104


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
  2011-01-15 16:38 ` [Bug debug/47308] " pluto at agmk dot net
@ 2011-01-16  1:10 ` pluto at agmk dot net
  2011-01-16  1:19 ` pluto at agmk dot net
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pluto at agmk dot net @ 2011-01-16  1:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

--- Comment #2 from Pawel Sikora <pluto at agmk dot net> 2011-01-16 01:05:20 UTC ---
without SSE2 vectorized lexer:

==2012== Invalid read of size 8
==2012==    at 0xB43064: search_line_acc_char (lex.c:263)
==2012==    by 0xB434FE: _cpp_clean_line (lex.c:669)
==2012==    by 0xB43F17: _cpp_get_fresh_line (lex.c:1888)
==2012==    by 0xB456FD: _cpp_lex_direct (lex.c:1953)
==2012==    by 0xB46576: _cpp_lex_token (lex.c:1827)
==2012==    by 0xB48BE7: cpp_get_token (macro.c:1240)
==2012==    by 0xB48E7F: cpp_get_token_with_location (macro.c:1352)
==2012==    by 0x4F9F82: c_lex_with_flags (c-lex.c:302)
==2012==    by 0x46382F: cp_lexer_get_preprocessor_token (parser.c:548)
==2012==    by 0x47CA22: c_parse_file (parser.c:425)
==2012==    by 0x4FDA74: c_common_parse_file (c-opts.c:1071)
==2012==    by 0x727973: toplev_main (toplev.c:579)
==2012==  Address 0x531cd00 is 160 bytes inside a block of size 163 alloc'd
==2012==    at 0x4C25322: realloc (vg_replace_malloc.c:525)
==2012==    by 0xB6D38C: xrealloc (xmalloc.c:179)
==2012==    by 0xB37F5F: _cpp_convert_input (charset.c:1734)
==2012==    by 0xB402F2: read_file (files.c:648)
==2012==    by 0xB4150A: _cpp_stack_file (files.c:723)
==2012==    by 0xB38D60: do_include_common (directives.c:792)
==2012==    by 0xB3A260: _cpp_handle_directive (directives.c:491)
==2012==    by 0xB46594: _cpp_lex_token (lex.c:1839)
==2012==    by 0xB48BE7: cpp_get_token (macro.c:1240)
==2012==    by 0xB48E7F: cpp_get_token_with_location (macro.c:1352)
==2012==    by 0x4F9F82: c_lex_with_flags (c-lex.c:302)
==2012==    by 0x46382F: cp_lexer_get_preprocessor_token (parser.c:548)
==2012==
==2012==
==2012== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- y
==2012== starting debugger with cmd: gdb --nw /proc/2013/fd/1014 2013
GNU gdb (GDB) PLD Linux (7.2-1)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pld-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /proc/2013/fd/1014...done.
Attaching to program: /proc/2013/fd/1014, process 2013
Reading symbols from /usr/lib64/valgrind/vgpreload_core-amd64-linux.so...done.
Loaded symbols for /usr/lib64/valgrind/vgpreload_core-amd64-linux.so
Reading symbols from
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so...done.
Loaded symbols for /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so
Reading symbols from /lib64/libc.so.6...Reading symbols from
/usr/lib/debug/lib64/libc-2.12.2.so.debug...done.
done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from
/usr/lib/debug/lib64/ld-2.12.2.so.debug...done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
0x0000000000b43064 in search_line_acc_char (s=<value optimized out>, end=<value
optimized out>) at ../../libcpp/lex.c:263
263           val = *++p;
(gdb) bt
#0  0x0000000000b43064 in search_line_acc_char (s=<value optimized out>,
end=<value optimized out>) at ../../libcpp/lex.c:263
#1  0x0000000000b434ff in _cpp_clean_line (pfile=0x521d260) at
../../libcpp/lex.c:669
#2  0x0000000000b43f18 in _cpp_get_fresh_line (pfile=0x521d260) at
../../libcpp/lex.c:1888
#3  0x0000000000b456fe in _cpp_lex_direct (pfile=0x521d260) at
../../libcpp/lex.c:1953
#4  0x0000000000b46577 in _cpp_lex_token (pfile=0x521d260) at
../../libcpp/lex.c:1827
#5  0x0000000000b48be8 in cpp_get_token (pfile=0x521d260) at
../../libcpp/macro.c:1240
#6  0x0000000000b48e80 in cpp_get_token_with_location (pfile=0x521d260,
loc=0x4141184) at ../../libcpp/macro.c:1352
#7  0x00000000004f9f83 in c_lex_with_flags (value=0x4141188, loc=0x4141184,
cpp_flags=0x4141182 "", lex_flags=2) at ../../gcc/c-family/c-lex.c:302
#8  0x0000000000463830 in cp_lexer_get_preprocessor_token (lexer=<value
optimized out>, token=0x4141180) at ../../gcc/cp/parser.c:548
#9  0x000000000047ca23 in cp_lexer_new_main () at ../../gcc/cp/parser.c:425
#10 cp_parser_new () at ../../gcc/cp/parser.c:3197
#11 c_parse_file () at ../../gcc/cp/parser.c:25275
#12 0x00000000004fda75 in c_common_parse_file () at
../../gcc/c-family/c-opts.c:1071
#13 0x0000000000727974 in compile_file (argc=62, argv=0x7fefff608) at
../../gcc/toplev.c:579
#14 do_compile (argc=62, argv=0x7fefff608) at ../../gcc/toplev.c:1874
#15 toplev_main (argc=62, argv=0x7fefff608) at ../../gcc/toplev.c:1937
#16 0x0000000004e48cbd in __libc_start_main (main=0x50bdb0 <main>, argc=62,
ubp_av=0x7fefff608, init=<value optimized out>, fini=<value optimized out>,
rtld_fini=<value optimized out>, stack_end=0x7fefff5f8) at libc-start.c:226
#17 0x0000000000402889 in _start () at ../sysdeps/x86_64/elf/start.S:113
(gdb) p p
$1 = (const word_type *) 0x531cd00
(gdb) l
258               int i = acc_char_index (t, val);
259               if (i >= 0)
260                 return (const uchar *)p + i;
261             }
262
263           val = *++p;
264         }
265     }


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
  2011-01-15 16:38 ` [Bug debug/47308] " pluto at agmk dot net
  2011-01-16  1:10 ` pluto at agmk dot net
@ 2011-01-16  1:19 ` pluto at agmk dot net
  2011-01-21 11:09 ` ktietz at gcc dot gnu.org
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pluto at agmk dot net @ 2011-01-16  1:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

--- Comment #3 from Pawel Sikora <pluto at agmk dot net> 2011-01-16 01:09:21 UTC ---
(In reply to comment #2)
> without SSE2 vectorized lexer:
> 
> ==2012== Invalid read of size 8
(...)

ahhh, comment for wrong PR. please ignore.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (2 preceding siblings ...)
  2011-01-16  1:19 ` pluto at agmk dot net
@ 2011-01-21 11:09 ` ktietz at gcc dot gnu.org
  2011-01-21 12:39 ` pluto at agmk dot net
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2011-01-21 11:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2011.01.21 10:22:13
     Ever Confirmed|0                           |1

--- Comment #4 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-01-21 10:22:13 UTC ---
Hmm, can't reproduce issue with current 4.6.0 gcc. Could you please retest with
current version. It seems issue was already solved.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (3 preceding siblings ...)
  2011-01-21 11:09 ` ktietz at gcc dot gnu.org
@ 2011-01-21 12:39 ` pluto at agmk dot net
  2011-01-21 13:00 ` ktietz at gcc dot gnu.org
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pluto at agmk dot net @ 2011-01-21 12:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

--- Comment #5 from Pawel Sikora <pluto at agmk dot net> 2011-01-21 12:23:04 UTC ---
(In reply to comment #4)
> Hmm, can't reproduce issue with current 4.6.0 gcc. Could you please retest with
> current version. It seems issue was already solved.

i'm still see the problem. probably it's some configuration detail to expose
it.

my gcc mingw64 crosscompiler runs on linux.

$ /local/devel/toolchain46/x86_64-pc-mingw32/bin/x86_64-pc-mingw32-g++ -v
Using built-in specs.
COLLECT_GCC=/local/devel/toolchain46/x86_64-pc-mingw32/bin/x86_64-pc-mingw32-g++
COLLECT_LTO_WRAPPER=/local/devel/toolchain46/x86_64-pc-mingw32.host64/lib/gcc/x86_64-pc-mingw32/4.6.0/lto-wrapper
Target: x86_64-pc-mingw32
Configured with: ../configure --target=x86_64-pc-mingw32 --with-arch=core2
--prefix=/local/devel/toolchain46/x86_64-pc-mingw32.host64
--with-sysroot=/local/devel/toolchain46/x86_64-pc-mingw32.host64
--libdir=/local/devel/toolchain46/x86_64-pc-mingw32.host64/lib
--libexecdir=/local/devel/toolchain46/x86_64-pc-mingw32.host64/lib
--with-slibdir=/local/devel/toolchain46/x86_64-pc-mingw32.host64/lib
--with-gmp-include=/home/users/pluto/alatek/toolchain/trunk/gcc-math-runtime/include
--with-gmp-lib=/home/users/pluto/alatek/toolchain/trunk/gcc-math-runtime/lib
--with-mpfr-include=/home/users/pluto/alatek/toolchain/trunk/gcc-math-runtime/include
--with-mpfr-lib=/home/users/pluto/alatek/toolchain/trunk/gcc-math-runtime/lib
--with-mpc-include=/home/users/pluto/alatek/toolchain/trunk/gcc-math-runtime/include
--with-mpc-lib=/home/users/pluto/alatek/toolchain/trunk/gcc-math-runtime/lib
--disable-multilib --disable-nls --disable-libgomp --disable-libmudflap
--disable-libquadmath --disable-libssp --enable-tls
--enable-libstdcxx-allocator=mt --enable-cxx-flags='-O2 -mcld -gdwarf-4 -g2'
--disable-libstdcxx-pch --disable-lto --disable-plugin --enable-c99
--enable-long-long --disable-win32-registry --enable-threads=win32
--enable-sjlj-exceptions --enable-shared --enable-fully-dynamic-string
--enable-__cxa_atexit --enable-languages=c,c++
--enable-checking=yes,df,rtl,tree --disable-symvers --with-long-double-128
--disable-cld --disable-bootstrap
Thread model: win32
gcc version 4.6.0 20110121 (experimental) (GCC)

$ /local/devel/toolchain46/x86_64-pc-mingw32/bin/x86_64-pc-mingw32-as --version
GNU assembler (Linux/GNU Binutils) 2.21.51.0.6.20110118


interesting 'bad register' info in .debug_frame section:

$ /local/devel/toolchain46/x86_64-pc-mingw32/bin/x86_64-pc-mingw32-objdump
--dwarf=frames main.o     

main.o:     file format pe-x86-64

Contents of the .debug_frame section:

00000000 00000014 ffffffff CIE
  Version:               1
  Augmentation:          ""
  Code alignment factor: 1
  Data alignment factor: -8
  Return address column: 16

  DW_CFA_def_cfa: r7 (rsp) ofs 8
  DW_CFA_offset: r16 (rip) at cfa-8
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop

00000018 00000024 00000000 FDE cie=00000000 pc=00000000..0000002e
  DW_CFA_advance_loc: 1 to 00000001
  DW_CFA_def_cfa_offset: 16
  DW_CFA_offset: r6 (rbp) at cfa-16
  DW_CFA_advance_loc: 3 to 00000004
  DW_CFA_def_cfa_register: r6 (rbp)
  DW_CFA_advance_loc: 41 to 0000002d
  DW_CFA_def_cfa: r7 (rsp) ofs 8
  DW_CFA_restore: r6 (rbp)
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop

00000040 00000024 00000000 FDE cie=00000000 pc=0000002e..0000005c
  DW_CFA_advance_loc: 1 to 0000002f
  DW_CFA_def_cfa_offset: 16
  DW_CFA_offset: r6 (rbp) at cfa-16
  DW_CFA_advance_loc: 3 to 00000032
  DW_CFA_def_cfa_register: r6 (rbp)
  DW_CFA_advance_loc: 41 to 0000005b
  DW_CFA_def_cfa: r7 (rsp) ofs 8
  DW_CFA_restore: r6 (rbp)
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop

00000068 0000007c 00000000 FDE cie=00000000 pc=0000005c..00000270
  DW_CFA_advance_loc: 1 to 0000005d
  DW_CFA_def_cfa_offset: 16
  DW_CFA_offset: r6 (rbp) at cfa-16
  DW_CFA_advance_loc: 2 to 0000005f
  DW_CFA_def_cfa_offset: 24
  DW_CFA_offset: r15 (r15) at cfa-24
  DW_CFA_advance_loc: 2 to 00000061
  DW_CFA_def_cfa_offset: 32
  DW_CFA_offset: r14 (r14) at cfa-32
  DW_CFA_advance_loc: 2 to 00000063
  DW_CFA_def_cfa_offset: 40
  DW_CFA_offset: r13 (r13) at cfa-40
  DW_CFA_advance_loc: 2 to 00000065
  DW_CFA_def_cfa_offset: 48
  DW_CFA_offset: r12 (r12) at cfa-48
  DW_CFA_advance_loc: 1 to 00000066
  DW_CFA_def_cfa_offset: 56
  DW_CFA_offset: r5 (rdi) at cfa-56
  DW_CFA_advance_loc: 1 to 00000067
  DW_CFA_def_cfa_offset: 64
  DW_CFA_offset: r4 (rsi) at cfa-64
  DW_CFA_advance_loc: 1 to 00000068
  DW_CFA_def_cfa_offset: 72
  DW_CFA_offset: r3 (rbx) at cfa-72
  DW_CFA_advance_loc: 7 to 0000006f
  DW_CFA_def_cfa_offset: 416
  DW_CFA_advance_loc: 8 to 00000077
  DW_CFA_def_cfa: r6 (rbp) ofs 288
  DW_CFA_advance_loc1: 118 to 000000ed
  DW_CFA_offset: r32 (xmm15) at cfa-96
  DW_CFA_offset: r31 (xmm14) at cfa-112
  DW_CFA_offset: r30 (xmm13) at cfa-128
  DW_CFA_offset: r29 (xmm12) at cfa-144
  DW_CFA_offset: r28 (xmm11) at cfa-160
  DW_CFA_offset: r27 (xmm10) at cfa-176
  DW_CFA_offset: r26 (xmm9) at cfa-192
  DW_CFA_offset: r25 (xmm8) at cfa-208
  DW_CFA_offset: r24 (xmm7) at cfa-224
  DW_CFA_offset: r23 (xmm6) at cfa-240
  DW_CFA_advance_loc2: 374 to 00000263
  DW_CFA_restore: bad register: r32 (xmm15)      <==== bad register ???
  DW_CFA_restore: bad register: r31 (xmm14)
  DW_CFA_restore: bad register: r30 (xmm13)
  DW_CFA_restore: bad register: r29 (xmm12)
  DW_CFA_restore: bad register: r28 (xmm11)
  DW_CFA_restore: bad register: r27 (xmm10)
  DW_CFA_restore: bad register: r26 (xmm9)
  DW_CFA_restore: bad register: r25 (xmm8)
  DW_CFA_restore: bad register: r24 (xmm7)
  DW_CFA_restore: bad register: r23 (xmm6)
  DW_CFA_advance_loc: 1 to 00000264
  DW_CFA_restore: r3 (rbx)
  DW_CFA_advance_loc: 1 to 00000265
  DW_CFA_restore: r4 (rsi)
  DW_CFA_advance_loc: 1 to 00000266
  DW_CFA_restore: r5 (rdi)
  DW_CFA_advance_loc: 2 to 00000268
  DW_CFA_restore: r12 (r12)
  DW_CFA_advance_loc: 2 to 0000026a
  DW_CFA_restore: r13 (r13)
  DW_CFA_advance_loc: 2 to 0000026c
  DW_CFA_restore: r14 (r14)
  DW_CFA_advance_loc: 2 to 0000026e
  DW_CFA_restore: r15 (r15)
  DW_CFA_advance_loc: 1 to 0000026f
  DW_CFA_def_cfa_sf: r7 (rsp) ofs -280
  DW_CFA_restore: r6 (rbp)
  DW_CFA_nop


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (4 preceding siblings ...)
  2011-01-21 12:39 ` pluto at agmk dot net
@ 2011-01-21 13:00 ` ktietz at gcc dot gnu.org
  2011-01-21 13:46 ` pluto at agmk dot net
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2011-01-21 13:00 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

--- Comment #6 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-01-21 12:39:13 UTC ---
I don't see an obvious difference to my toolchain (beside I use a cygwin
cross-compiler). But such issues could be related also to used binutils
version. I am using:
$x86_64-pc-mingw32-ld.exe -v
 GNU ld (GNU Binutils) 2.21.51.20110114


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (5 preceding siblings ...)
  2011-01-21 13:00 ` ktietz at gcc dot gnu.org
@ 2011-01-21 13:46 ` pluto at agmk dot net
  2011-01-21 13:50 ` ktietz at gcc dot gnu.org
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pluto at agmk dot net @ 2011-01-21 13:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

--- Comment #7 from Pawel Sikora <pluto at agmk dot net> 2011-01-21 13:37:21 UTC ---
(In reply to comment #6)
> I don't see an obvious difference to my toolchain (beside I use a cygwin
> cross-compiler). But such issues could be related also to used binutils
> version. I am using:
> $x86_64-pc-mingw32-ld.exe -v
>  GNU ld (GNU Binutils) 2.21.51.20110114

could you compile on cygwin the assembly source from testcase
and check compiled object with objdump against dwarf corruption?
('DW_CFA_restore: bad register')


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (6 preceding siblings ...)
  2011-01-21 13:46 ` pluto at agmk dot net
@ 2011-01-21 13:50 ` ktietz at gcc dot gnu.org
  2011-01-21 14:07 ` pluto at agmk dot net
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2011-01-21 13:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

--- Comment #8 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-01-21 13:41:57 UTC ---
Well, I would, if I could extract .xz attachments. Could you re-attach it as
bz2?


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (7 preceding siblings ...)
  2011-01-21 13:50 ` ktietz at gcc dot gnu.org
@ 2011-01-21 14:07 ` pluto at agmk dot net
  2011-01-21 14:12 ` ktietz at gcc dot gnu.org
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pluto at agmk dot net @ 2011-01-21 14:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

Pawel Sikora <pluto at agmk dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #22975|0                           |1
        is obsolete|                            |

--- Comment #9 from Pawel Sikora <pluto at agmk dot net> 2011-01-21 13:51:37 UTC ---
Created attachment 23062
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23062
testcase

testcase repacked.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (8 preceding siblings ...)
  2011-01-21 14:07 ` pluto at agmk dot net
@ 2011-01-21 14:12 ` ktietz at gcc dot gnu.org
  2011-01-21 16:03 ` ktietz at gcc dot gnu.org
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2011-01-21 14:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #10 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-01-21 14:05:31 UTC ---
(In reply to comment #9)
> Created attachment 23062 [details]
> testcase
> 
> testcase repacked.

Thanks, I can confirm this issue.
Interesting is that my old gdb is able to read it. It has something to do with
used register tables.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (9 preceding siblings ...)
  2011-01-21 14:12 ` ktietz at gcc dot gnu.org
@ 2011-01-21 16:03 ` ktietz at gcc dot gnu.org
  2011-01-21 19:09 ` pluto at agmk dot net
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2011-01-21 16:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #11 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-01-21 15:32:20 UTC ---
Found the issue. It is binutils related. For x64 windows target the
x86_dwarf2_return_column get initialized with wrong value. I will file a patch
for binutils for this.
It is no gcc bug, so I close it as invalid. Thanks again for finding this
issue.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (10 preceding siblings ...)
  2011-01-21 16:03 ` ktietz at gcc dot gnu.org
@ 2011-01-21 19:09 ` pluto at agmk dot net
  2011-02-12  9:44 ` pluto at agmk dot net
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pluto at agmk dot net @ 2011-01-21 19:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

--- Comment #12 from Pawel Sikora <pluto at agmk dot net> 2011-01-21 18:41:50 UTC ---
On Friday, January 21, 2011 04:32:23 pm you wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308
> 
> Kai Tietz <ktietz at gcc dot gnu.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|NEW                         |RESOLVED
>          Resolution|                            |INVALID
> 
> --- Comment #11 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-01-21 15:32:20 UTC ---
> Found the issue. It is binutils related. For x64 windows target the
> x86_dwarf2_return_column get initialized with wrong value. I will file a patch
> for binutils for this.
> It is no gcc bug, so I close it as invalid. Thanks again for finding this
> issue.

btw. with the patch posted to binutils mailing list i see better debug dump

(...)
  DW_CFA_advance_loc2: 374 to 00000263
  DW_CFA_restore: r32 (xmm15)
  DW_CFA_restore: r31 (xmm14)
  DW_CFA_restore: r30 (xmm13)
  DW_CFA_restore: r29 (xmm12)
  DW_CFA_restore: r28 (xmm11)
  DW_CFA_restore: r27 (xmm10)
  DW_CFA_restore: r26 (xmm9)
  DW_CFA_restore: r25 (xmm8)
  DW_CFA_restore: r24 (xmm7)
  DW_CFA_restore: r23 (xmm6)
  DW_CFA_advance_loc: 1 to 00000264
(...)

but the gdb.exe on windows still fails with $subject message :(


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (11 preceding siblings ...)
  2011-01-21 19:09 ` pluto at agmk dot net
@ 2011-02-12  9:44 ` pluto at agmk dot net
  2011-02-12  9:48 ` pluto at agmk dot net
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pluto at agmk dot net @ 2011-02-12  9:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

Pawel Sikora <pluto at agmk dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |

--- Comment #13 from Pawel Sikora <pluto at agmk dot net> 2011-02-12 09:43:49 UTC ---
binutils-2.21.51.0.6 patched with
http://cygwin.com/ml/binutils/2011-01/msg00323.html
doesn't solve this issue.

gdb still reports errors about DIE and objdump shows multiple errors in dwarf.
please see main64.err from new attachment.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (12 preceding siblings ...)
  2011-02-12  9:44 ` pluto at agmk dot net
@ 2011-02-12  9:48 ` pluto at agmk dot net
  2011-03-18 20:15 ` pluto at agmk dot net
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pluto at agmk dot net @ 2011-02-12  9:48 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

Pawel Sikora <pluto at agmk dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #23062|0                           |1
        is obsolete|                            |

--- Comment #14 from Pawel Sikora <pluto at agmk dot net> 2011-02-12 09:44:31 UTC ---
Created attachment 23311
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23311
regenerated testcase.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (13 preceding siblings ...)
  2011-02-12  9:48 ` pluto at agmk dot net
@ 2011-03-18 20:15 ` pluto at agmk dot net
  2011-03-22 20:18 ` pluto at agmk dot net
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pluto at agmk dot net @ 2011-03-18 20:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

Pawel Sikora <pluto at agmk dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-debug
             Target|x86_64-pc-mingw32           |*-pc-mingw32

--- Comment #15 from Pawel Sikora <pluto at agmk dot net> 2011-03-18 20:11:44 UTC ---
still occurs on fresh 4.6 branch build.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (14 preceding siblings ...)
  2011-03-18 20:15 ` pluto at agmk dot net
@ 2011-03-22 20:18 ` pluto at agmk dot net
  2011-06-05 11:44 ` pluto at agmk dot net
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pluto at agmk dot net @ 2011-03-22 20:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

--- Comment #16 from Pawel Sikora <pluto at agmk dot net> 2011-03-22 20:03:09 UTC ---
i've tested the latest 4.5 branch head. it produces less objdump errors
but the core issue still exists. afaics the gdb-7.2 on win32 has problems
with cfi_esacpes before ___main.

_main:
LFB598:
    .loc 1 21 0
    .cfi_startproc
    .cfi_personality 0x0,___gxx_personality_sj0
    .cfi_lsda 0x0,LLSDA598
    leal    4(%esp), %ecx
    .cfi_def_cfa 1, 0
    andl    $-16, %esp
    pushl    -4(%ecx)
    pushl    %ebp
    movl    %esp, %ebp
    .cfi_escape 0x10,0x5,0x2,0x75,0x0
    pushl    %edi
    pushl    %esi
    pushl    %ebx
    pushl    %ecx
    .cfi_escape 0xf,0x3,0x75,0x70,0x6
    subl    $104, %esp
    movl    $___gxx_personality_sj0, -68(%ebp)
    movl    $LLSDA598, -64(%ebp)
    leal    -60(%ebp), %eax
    leal    -24(%ebp), %edx
    movl    %edx, (%eax)
    movl    $L8, %edx
    movl    %edx, 4(%eax)
    movl    %esp, 8(%eax)
    leal    -92(%ebp), %eax
    movl    %eax, (%esp)
    .cfi_escape 0x10,0x3,0x2,0x75,0x74             <==== gdb error.
    .cfi_escape 0x10,0x6,0x2,0x75,0x78             <====
    .cfi_escape 0x10,0x7,0x2,0x75,0x7c             <====
    call    __Unwind_SjLj_Register
    .loc 1 21 0
    call    ___main 


Breakpoint 1, main () at main.cpp:21
21      {
(gdb) disassemble
Dump of assembler code for function main():
   0x0040163c <+0>:     lea    0x4(%esp),%ecx
   0x00401640 <+4>:     and    $0xfffffff0,%esp
   0x00401643 <+7>:     pushl  -0x4(%ecx)
   0x00401646 <+10>:    push   %ebp
   0x00401647 <+11>:    mov    %esp,%ebp
   0x00401649 <+13>:    push   %edi
   0x0040164a <+14>:    push   %esi
   0x0040164b <+15>:    push   %ebx
   0x0040164c <+16>:    push   %ecx
   0x0040164d <+17>:    sub    $0x68,%esp
   0x00401650 <+20>:    movl   $0x40b920,-0x44(%ebp)
   0x00401657 <+27>:    movl   $0x40c03c,-0x40(%ebp)
   0x0040165e <+34>:    lea    -0x3c(%ebp),%eax
   0x00401661 <+37>:    lea    -0x18(%ebp),%edx
   0x00401664 <+40>:    mov    %edx,(%eax)
   0x00401666 <+42>:    mov    $0x401716,%edx
   0x0040166b <+47>:    mov    %edx,0x4(%eax)
   0x0040166e <+50>:    mov    %esp,0x8(%eax)
   0x00401671 <+53>:    lea    -0x5c(%ebp),%eax
   0x00401674 <+56>:    mov    %eax,(%esp)
   0x00401677 <+59>:    Dwarf Error: Cannot find signatured DIE referenced from
DIE at 0x1397e

could someone decrypt these magic cfi_escapes?


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (15 preceding siblings ...)
  2011-03-22 20:18 ` pluto at agmk dot net
@ 2011-06-05 11:44 ` pluto at agmk dot net
  2012-06-16 12:55 ` internet at 123gen dot com
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pluto at agmk dot net @ 2011-06-05 11:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

--- Comment #17 from Pawel Sikora <pluto at agmk dot net> 2011-06-05 11:43:45 UTC ---
i've found the clue: pushing -gdwarf-4 through --enable-cxx-flags breaks the
world.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (16 preceding siblings ...)
  2011-06-05 11:44 ` pluto at agmk dot net
@ 2012-06-16 12:55 ` internet at 123gen dot com
  2013-03-24 20:56 ` internet at 123gen dot com
  2015-02-25 12:53 ` ktietz at gcc dot gnu.org
  19 siblings, 0 replies; 21+ messages in thread
From: internet at 123gen dot com @ 2012-06-16 12:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

Zouzou <internet at 123gen dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |internet at 123gen dot com

--- Comment #18 from Zouzou <internet at 123gen dot com> 2012-06-16 12:55:20 UTC ---
Hi,

Using GCC 4.7 & GDB 7.4 from a regular MinGW install (mingw-get install gcc
gdb), I can reproduce this.

Just adding -g-dwarf4 is enough to create the problem. It seems GDB 7.4 chokes
on the DWARF 4 information.

The test case is then very simple: just a int* x = 0; *x = 2; or any other
simple crash. When the program crashes, GDB displays that error instead of
interrupting the program and doesn't allow getting a backtrace.

I would love to see this fixed in order to use DWARF 4 (its duplicated type DIE
elimination especially).

Here are my GCC & GDB configs; feel free to ask for more information:

gcc -v:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.7.0/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.7.0/configure
--enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions
--with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry
--enable-libstdcxx-debug --disable-build-poststage1-with-cxx
--enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.7.0 (GCC) 

gdb -v:
GNU gdb (GDB) 7.4
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (17 preceding siblings ...)
  2012-06-16 12:55 ` internet at 123gen dot com
@ 2013-03-24 20:56 ` internet at 123gen dot com
  2015-02-25 12:53 ` ktietz at gcc dot gnu.org
  19 siblings, 0 replies; 21+ messages in thread
From: internet at 123gen dot com @ 2013-03-24 20:56 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

--- Comment #19 from Zouzou <internet at 123gen dot com> 2013-03-24 20:56:40 UTC ---
Hi,

This appears to have been fixed. I can no longer reproduce it with GCC 4.8 and
GDB 7.5.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug debug/47308] Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe]
  2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
                   ` (18 preceding siblings ...)
  2013-03-24 20:56 ` internet at 123gen dot com
@ 2015-02-25 12:53 ` ktietz at gcc dot gnu.org
  19 siblings, 0 replies; 21+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-25 12:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47308

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #20 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Yes, issue got fixed beginning with 4.8.2 (and higher) as verified by testing
through versions.
So close this bug.


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2015-02-25 11:25 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-15 16:22 [Bug debug/47308] New: Dwarf Error: Cannot find signatured DIE referenced from DIE at 0x2581 [in module D:\main64.exe] pluto at agmk dot net
2011-01-15 16:38 ` [Bug debug/47308] " pluto at agmk dot net
2011-01-16  1:10 ` pluto at agmk dot net
2011-01-16  1:19 ` pluto at agmk dot net
2011-01-21 11:09 ` ktietz at gcc dot gnu.org
2011-01-21 12:39 ` pluto at agmk dot net
2011-01-21 13:00 ` ktietz at gcc dot gnu.org
2011-01-21 13:46 ` pluto at agmk dot net
2011-01-21 13:50 ` ktietz at gcc dot gnu.org
2011-01-21 14:07 ` pluto at agmk dot net
2011-01-21 14:12 ` ktietz at gcc dot gnu.org
2011-01-21 16:03 ` ktietz at gcc dot gnu.org
2011-01-21 19:09 ` pluto at agmk dot net
2011-02-12  9:44 ` pluto at agmk dot net
2011-02-12  9:48 ` pluto at agmk dot net
2011-03-18 20:15 ` pluto at agmk dot net
2011-03-22 20:18 ` pluto at agmk dot net
2011-06-05 11:44 ` pluto at agmk dot net
2012-06-16 12:55 ` internet at 123gen dot com
2013-03-24 20:56 ` internet at 123gen dot com
2015-02-25 12:53 ` ktietz at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).