[Dwarf-Discuss] dsymutil: "could not find referenced DIE" followed by a segmentation fault and other newbie questions

Michael Eager eager at eagerm.com
Sun Dec 9 07:55:16 PST 2018


On 12/09/2018 07:27 AM, Gil Moses via Dwarf-Discuss wrote:
> Hi Michael,
> 
> Although it might be a bug in Clang, I'd like to get a grip on the DWARF side of it - i.e. understanding the error and tracking down the root cause.
> Also, since dsymutil is an open source project util that generates DWARF files, I was hoping someone would know where to download the project. Then, I might be able to debug my problem.

DW_TAG_imported_declaration is the DWARF representation of "using" in 
C++ (and similar constructs in other languages).  It says to include the 
DWARF DIE (and its children) which are pointed to by the DW_AT_import 
attribute (an offset in the current compilation unit) into the current 
scope.

Appendix D.3 in the DWARF Version 5 spec has an example.

In the error you received, dsymutil says that it could not find the DIE 
that the DW_AT_import referenced.  You can look at the DWARF debug info 
(using readelf or dwarfdump) and see what is at offset 0x4c4f5254.  If 
that is not a DIE, then the DWARF generated by clang is incorrect.  If 
it is a DIE, then dysmutil is confused.

-- 
Michael Eager    eager at eagerm.com
1960 Park Blvd., Palo Alto, CA 94306


More information about the Dwarf-Discuss mailing list