Fix issues with GCC debugging. GCC emits DWARF in unique ways that LLDB wasn't handli...
authorGreg Clayton <gclayton@apple.com>
Mon, 15 Jul 2013 21:10:17 +0000 (21:10 +0000)
committerGreg Clayton <gclayton@apple.com>
Mon, 15 Jul 2013 21:10:17 +0000 (21:10 +0000)
commit109f86860ae46f8a502760d5f21a580b109e8537
tree07d6f97b6d6f75fae6f37516981e76ad401f581a
parent8ac2ec4043b39392e26f4d7be818b2b0a257d501
Fix issues with GCC debugging. GCC emits DWARF in unique ways that LLDB wasn't handling. This fix will fix cases where classes are forward declared using DW_TAG_structure_type and then actually defined using DW_TAG_class_type. LLDB, when it finds a forward declaration, would try and find and parse the complete type. It does this by:

1 - looking up the type basename in the type index
2 - iterate through all matches and look for decl contexts (namespace/class hierarchy) that match

The issue was the decl context matching wasn't watching for DW_TAG_class_type/DW_TAG_structure_type mismatches, and it wasn't also getting the name for DIE's that didn't have a DW_AT_name, but did have a DW_AT_specification that had a name.

llvm-svn: 186347
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp