[Lldb-commits] [PATCH] D22218: Dwarf parser: don't lookup void typedefs in the DWO

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 11 06:30:06 PDT 2016


labath created this revision.
labath added a reviewer: clayborg.
labath added subscribers: tberghammer, lldb-commits.

void typedefs do not have a DW_AT_type attribute, so we end up with an empty encoding_uid
variable. These don't need to be looked up and trying to look that will assert in a debug build.

http://reviews.llvm.org/D22218

Files:
  source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp

Index: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
===================================================================
--- source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -328,7 +328,7 @@
                         }
                     }
 
-                    if (tag == DW_TAG_typedef)
+                    if (tag == DW_TAG_typedef && encoding_uid.IsValid())
                     {
                         // Try to parse a typedef from the DWO file first as modules
                         // can contain typedef'ed structures that have no names like:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22218.63499.patch
Type: text/x-patch
Size: 641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160711/46a9796d/attachment-0001.bin>


More information about the lldb-commits mailing list