Re: [Dwarf-Discuss] dsymutil: "could not find referenced DIE" followed by a segmentation fault and other newbie questions
> On Dec 8, 2018, at 6:24 AM, Gil Moses via Dwarf-Discuss > wrote: > > Hi, > > Building with Xcode 7, once in a while I get the following warnings from the > dsymutil tool (a few dozens): > "could not find referenced DIE" > Followed be a segmentation fault. > > Adding the verbosity flag, I got detailed information about the DIEs that had > the error, e.g.: > === > while processing > /p4client/ProAudio/dev_main/ProAudio/XcodeBuildProducts/Debug/libWaveShell-Common.a(GraphicStream_Utils.o): > warning: could not find referenced DIE >in DIE: > > 0x0001415e: DW_TAG_imported_declaration [99] >DW_AT_decl_file [DW_FORM_data1] > ("/Applications/Xcode7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types/_time_t.h") >DW_AT_decl_line [DW_FORM_data2](20047) >DW_AT_import [DW_FORM_ref4](cu + 0x4c4f5254 => > {0x4c4f5254}) > > > How do I go about understanding the error, what caused it and how to solve it? > BTW, the lib size being built is around 350MB. Could there be a size issue > causing this seg fault? If you have questions about Apple-specific versions of the various LLVM tools, the best way to get in contact is to file a bugreport on https://bugreport.apple.com/. The version of dsymutil that you are using (700) is quite old. Is using a newer version from a more recent Xcode an option for you? > While I'm here, where could I download the full source code of dsymutil? All > I found was links to separate files > (https://opensource.apple.com/source/clang/clang-700.0.72/src/tools/dsymutil/) Dsymutil is part of the LLVM project, if you want to build it from source, you'll need to download LLVM and compile the "dsymutil" target. The https://opensource.apple.com/source/clang/clang-700.0.72/src directory you mentioned should contains the entire LLVM project. Instructions for building it can be found here: http://llvm.org/docs/GettingStarted.html. That said, I would recommend trying a more recent version of dsymutil first. -- adrian ___ Dwarf-Discuss mailing list Dwarf-Discuss@lists.dwarfstd.org http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org
Re: [Dwarf-Discuss] dsymutil: "could not find referenced DIE" followed by a segmentation fault and other newbie questions
> 0x0001415e: DW_TAG_imported_declaration [99] > DW_AT_decl_file [DW_FORM_data1] > ("/Applications/Xcode7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types/_time_t.h") > DW_AT_decl_line [DW_FORM_data2] (20047) > DW_AT_import [DW_FORM_ref4] (cu + 0x4c4f5254 => > {0x4c4f5254}) > > > How do I go about understanding the error, what caused it and how to solve it? > BTW, the lib size being built is around 350MB. Could there be a size issue > causing this seg fault? The offset it gives, 0x4c4f5254, is much too large for a file in the 350MB range, so this is clearly bogus. The value is ASCII for "LORT" -- it looks like an ASCII string has made its way into your DWARF info somehow. -cary ___ Dwarf-Discuss mailing list Dwarf-Discuss@lists.dwarfstd.org http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org
Re: [Dwarf-Discuss] dsymutil: "could not find referenced DIE" followed by a segmentation fault and other newbie questions
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 Eagerea...@eagerm.com 1960 Park Blvd., Palo Alto, CA 94306 ___ Dwarf-Discuss mailing list Dwarf-Discuss@lists.dwarfstd.org http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org
Re: [Dwarf-Discuss] dsymutil: "could not find referenced DIE" followed by a segmentation fault and other newbie questions
BTW, following your advice I also posted in two other lists - CLang and LLVM. Gil. ___ Dwarf-Discuss mailing list Dwarf-Discuss@lists.dwarfstd.org http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org
Re: [Dwarf-Discuss] dsymutil: "could not find referenced DIE" followed by a segmentation fault and other newbie questions
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. Thanks, Gil. ___ Dwarf-Discuss mailing list Dwarf-Discuss@lists.dwarfstd.org http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org
Re: [Dwarf-Discuss] dsymutil: "could not find referenced DIE" followed by a segmentation fault and other newbie questions
On 12/08/2018 06:24 AM, Gil Moses via Dwarf-Discuss wrote: Hi, Building with Xcode 7, once in a while I get the following warnings from the dsymutil tool (a few dozens): "could not find referenced DIE" Followed be a segmentation fault. Adding the verbosity flag, I got detailed information about the DIEs that had the error, e.g.: === while processing /p4client/ProAudio/dev_main/ProAudio/XcodeBuildProducts/Debug/libWaveShell-Common.a(GraphicStream_Utils.o): warning: could not find referenced DIE in DIE: 0x0001415e: DW_TAG_imported_declaration [99] DW_AT_decl_file [DW_FORM_data1] ("/Applications/Xcode7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types/_time_t.h") DW_AT_decl_line [DW_FORM_data2](20047) DW_AT_import [DW_FORM_ref4](cu + 0x4c4f5254 => {0x4c4f5254}) How do I go about understanding the error, what caused it and how to solve it? BTW, the lib size being built is around 350MB. Could there be a size issue causing this seg fault? While I'm here, where could I download the full source code of dsymutil? All I found was links to separate files (https://opensource.apple.com/source/clang/clang-700.0.72/src/tools/dsymutil/) Thanks, Gil Moses. Hi Gil -- This is not really a question about DWARF. This looks like a bug in Clang. You would get more help with this by sending your question to the LLVM/Clang mailing list. -- Michael Eagerea...@eagerm.com 1960 Park Blvd., Palo Alto, CA 94306 ___ Dwarf-Discuss mailing list Dwarf-Discuss@lists.dwarfstd.org http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org
[Dwarf-Discuss] dsymutil: "could not find referenced DIE" followed by a segmentation fault and other newbie questions
Hi, Building with Xcode 7, once in a while I get the following warnings from the dsymutil tool (a few dozens): "could not find referenced DIE" Followed be a segmentation fault. Adding the verbosity flag, I got detailed information about the DIEs that had the error, e.g.: === while processing /p4client/ProAudio/dev_main/ProAudio/XcodeBuildProducts/Debug/libWaveShell-Common.a(GraphicStream_Utils.o): warning: could not find referenced DIE in DIE: 0x0001415e: DW_TAG_imported_declaration [99] DW_AT_decl_file [DW_FORM_data1] ("/Applications/Xcode7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types/_time_t.h") DW_AT_decl_line [DW_FORM_data2] (20047) DW_AT_import [DW_FORM_ref4] (cu + 0x4c4f5254 => {0x4c4f5254}) How do I go about understanding the error, what caused it and how to solve it? BTW, the lib size being built is around 350MB. Could there be a size issue causing this seg fault? While I'm here, where could I download the full source code of dsymutil? All I found was links to separate files (https://opensource.apple.com/source/clang/clang-700.0.72/src/tools/dsymutil/) Thanks, Gil Moses. ___ Dwarf-Discuss mailing list Dwarf-Discuss@lists.dwarfstd.org http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org