Jump to page: 1 2 3
Thread overview
[Issue 1079] New: gdb on linux: Dwarf Error: Cannot find DIE at 0xb705 referenced from DIE at 0x250
Mar 23, 2007
d-bugmail
Apr 04, 2007
d-bugmail
Jun 25, 2007
d-bugmail
Jul 03, 2007
d-bugmail
Jul 23, 2007
d-bugmail
Aug 07, 2007
d-bugmail
Aug 07, 2007
d-bugmail
Aug 07, 2007
d-bugmail
Oct 28, 2007
d-bugmail
Dec 27, 2007
d-bugmail
Dec 28, 2007
d-bugmail
Feb 21, 2008
d-bugmail
Feb 21, 2008
d-bugmail
[Issue 1079] gdb: Dwarf Error: Cannot find DIE at 0xb705 referenced from DIE at 0x250
Oct 12, 2009
Leandro Lucarella
Oct 12, 2009
Leandro Lucarella
Oct 12, 2009
Leandro Lucarella
Jan 21, 2010
Bernard Helyer
Jan 21, 2010
Bernard Helyer
Jan 21, 2010
Bernard Helyer
Mar 19, 2010
Robert Clipsham
Mar 29, 2010
Robert Clipsham
Mar 29, 2010
Ellery Newcomer
Mar 29, 2010
Robert Clipsham
Apr 01, 2010
Robert Clipsham
Apr 01, 2010
Ellery Newcomer
Apr 01, 2010
Robert Clipsham
Apr 01, 2010
Robert Clipsham
Apr 02, 2010
Ellery Newcomer
Apr 22, 2010
Don
March 23, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1079

           Summary: gdb on linux: Dwarf Error: Cannot find DIE at 0xb705
                    referenced from DIE at 0x250
           Product: D
           Version: 1.009
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: someanon@yahoo.com


previously I can use gdb to debug binary generated by dmd; but now (1.009) it
reports:

Dwarf Error: Cannot find DIE at 0xb705 referenced from DIE at 0x250

when I want to set a bp; or the program seg faults.

GNU gdb 6.4-debian


-- 

April 04, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1079





------- Comment #1 from thomas-dloop@kuehne.cn  2007-04-04 15:36 -------
Can you please provide some sample code where this happens?


-- 

June 25, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1079





------- Comment #2 from hhasemann@web.de  2007-06-25 10:10 -------
The issue is still present on 1.017 but here only in a very large program. Im working on a minimal example.


-- 

July 03, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1079





------- Comment #3 from onlystupidspamhere@yahoo.se  2007-07-03 12:30 -------
(In reply to comment #1)
> Can you please provide some sample code where this happens?
> 

Here's a sample (die.d) that used to work some time ago:

  void main() {
    Object foo = null;
    auto b = foo.toUtf8;
  }

You need dmd 1.0xx (1.016 - 1.018 at least cause this) + tango (I'm using the
svn version). You also need to use -g switch.

$ dmd -g die.d
gcc die.o -o die -g -m32 -Xlinker -L/home/jm/d/dsss/lib -lphobos -lpthread -lm

$ gdb die
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /home/jm/tmp/die
[Thread debugging using libthread_db enabled]
[New Thread -1210349888 (LWP 4919)]
Die: DW_TAG_<unknown> (abbrev = 6, offset = 88)
        has children: FALSE
        attributes:
                DW_AT_byte_size (DW_FORM_data1) constant: 8
                DW_AT_type (DW_FORM_ref4) constant ref: 80 (adjusted)
Dwarf Error: Cannot find type of die [in module /home/jm/tmp/die]
(gdb)


-- 

July 23, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1079





------- Comment #4 from thomas-dloop@kuehne.cn  2007-07-23 14:56 -------
Added to DStress as http://dstress.kuehne.cn/norun/d/debug_info_13_A.d

(In this case using -gc instead of -g causes the propper gdb behaviour)


-- 

August 07, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1079





------- Comment #5 from onlystupidspamhere@yahoo.se  2007-08-07 09:54 -------
(In reply to comment #4)
> Added to DStress as http://dstress.kuehne.cn/norun/d/debug_info_13_A.d
> 
> (In this case using -gc instead of -g causes the proper gdb behaviour)

This example triggers the bug with dmd 1.011+ - at least dmd 1.010, 1.009, 1.001 seemed to work fine. GDB version, other compiler flags, runtime lib version (I tried libphobos.a 1.011 with dmd 1.010 too) didn't have any effect.


-- 

August 07, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1079


deewiant@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |regression




-- 

August 07, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1079





------- Comment #6 from onlystupidspamhere@yahoo.se  2007-08-07 09:58 -------
Created an attachment (id=168)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=168&action=view)
objdump -W binary diff

I'm not sure how much this helps, but these are the differences I found in the debugging info between dmd 1.010 and dmd 1.011 generated binaries. The runtime lib is phobos from dmd 1.011 in both binaries and there was no differences in the executable code.

Hopefully this gets fixed soon - people need to debug on Linux too.


-- 

October 28, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1079


braddr@puremagic.com changed:

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




------- Comment #7 from braddr@puremagic.com  2007-10-28 04:41 -------
The change in 1.011 that introduced this was intentional:

Extended Dwarf  symbolic debug output with DW_TAG_darray_type, DW_TAG_aarray_type, and DW_TAG_delegate types.

If you don't use a D aware debugger, then you need to compile with -gc to restrict the dwarf debug output.  The issue is on the gdb side in that it doesn't support these DWARF extensions and in fact throws its hands up more spectacularly than it needs to (it could continue past them while still emitting the 'I dont understand' message.

So, this falls into the 'not a bug' category.  The work around is to use '-gc' rather than just '-g'.  The more ideal fix is for someone to get all cozy with gdb to teach it about the new debug info.


-- 

December 27, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1079


stephan@kochen.nl changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stephan@kochen.nl
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |




------- Comment #8 from stephan@kochen.nl  2007-12-27 17:28 -------
I'm reopening this, because these seem to be two separate issues. The original problem still applies.

I've been working on an updated patch for GDB 6.7, based on the work available at dsource.org [1]. In addition to the demangler, there's also stubs for the DWARF extensions DMD uses. The simple example Jari-Matti (comment #3) wrote debugs just fine now.

However, my larger project still fails with a "Cannot find DIE" error. The original reporter didn't provide a lot of information. But getting a stacktrace from GDB itself where it reports this error in my project, shows the problem to be lying in:

DW_TAG_compilation_unit -> DW_TAG_subroutine_type -> DW_TAG_formal_parameter [ DW_AT_type ]

The reference in the type attribute isn't completely wild, it points within the .debug_info, but it's still invalid. The dwarfdump [2] utility also trips on this, so I'm again suspecting a problem in DMD.

I'm not sure what kind of construct in D generates this kind of output. The D module triggering it contains just 3 classes. I was unable to create a small test case.

[1] gdb-patches project: http://www.dsource.org/projects/gdb-patches [2] libdwarf and dwarfdump: http://reality.sgiweb.org/davea/dwarf.html


-- 

« First   ‹ Prev
1 2 3