summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2015-09-09 10:20:48 +0000
committerTamas Berghammer <tberghammer@google.com>2015-09-09 10:20:48 +0000
commiteb882fc1f8e76cccfaea5668fd743adb257c7975 (patch)
treebfe1696772304a2d5d981a3190d0f7042df230ce /lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
parent715cbe89398fcf2d977ec6ddc81201daf1cdfde4 (diff)
downloadbcm5719-llvm-eb882fc1f8e76cccfaea5668fd743adb257c7975.tar.gz
bcm5719-llvm-eb882fc1f8e76cccfaea5668fd743adb257c7975.zip
Add basic fission support to SymbolFileDWARF
* Create new dwo symbol file class * Add handling for .dwo sections * Change indexes in SymbolFileDWARF to store compile unit offset next to DIE offset * Propagate queries from dwarf compile unit to the dwo compile unit where applicable Differential revision: http://reviews.llvm.org/D12291 llvm-svn: 247132
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp b/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
index 2ad93c474a4..0db416054ae 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
@@ -14,7 +14,7 @@ DWARFMappedHash::ExtractDIEArray (const DIEInfoArray &die_info_array, DIEArray &
{
const size_t count = die_info_array.size();
for (size_t i=0; i<count; ++i)
- die_offsets.push_back (die_info_array[i].offset);
+ die_offsets.emplace_back(die_info_array[i].cu_offset, die_info_array[i].offset);
}
void
@@ -39,7 +39,7 @@ DWARFMappedHash::ExtractDIEArray (const DIEInfoArray &die_info_array,
tag_matches = tag == DW_TAG_structure_type || tag == DW_TAG_class_type;
}
if (tag_matches)
- die_offsets.push_back (die_info_array[i].offset);
+ die_offsets.emplace_back(die_info_array[i].cu_offset, die_info_array[i].offset);
}
}
}
@@ -69,7 +69,7 @@ DWARFMappedHash::ExtractDIEArray (const DIEInfoArray &die_info_array,
tag_matches = tag == DW_TAG_structure_type || tag == DW_TAG_class_type;
}
if (tag_matches)
- die_offsets.push_back (die_info_array[i].offset);
+ die_offsets.emplace_back(die_info_array[i].cu_offset, die_info_array[i].offset);
}
}
}
@@ -92,19 +92,19 @@ DWARFMappedHash::ExtractClassOrStructDIEArray (const DIEInfoArray &die_info_arra
// We found the one true definition for this class, so
// only return that
die_offsets.clear();
- die_offsets.push_back (die_info_array[i].offset);
+ die_offsets.emplace_back(die_info_array[i].cu_offset, die_info_array[i].offset);
return;
}
else
{
// Put the one true definition as the first entry so it
// matches first
- die_offsets.insert (die_offsets.begin(), die_info_array[i].offset);
+ die_offsets.emplace(die_offsets.begin(), die_info_array[i].cu_offset, die_info_array[i].offset);
}
}
else
{
- die_offsets.push_back (die_info_array[i].offset);
+ die_offsets.emplace_back(die_info_array[i].cu_offset, die_info_array[i].offset);
}
}
}
@@ -120,7 +120,7 @@ DWARFMappedHash::ExtractTypesFromDIEArray (const DIEInfoArray &die_info_array,
for (size_t i=0; i<count; ++i)
{
if ((die_info_array[i].type_flags & type_flag_mask) == type_flag_value)
- die_offsets.push_back (die_info_array[i].offset);
+ die_offsets.emplace_back(die_info_array[i].cu_offset, die_info_array[i].offset);
}
}
@@ -141,6 +141,7 @@ DWARFMappedHash::GetAtomTypeName (uint16_t atom)
}
DWARFMappedHash::DIEInfo::DIEInfo () :
+ cu_offset (DW_INVALID_OFFSET),
offset (DW_INVALID_OFFSET),
tag (0),
type_flags (0),
@@ -148,7 +149,12 @@ DWARFMappedHash::DIEInfo::DIEInfo () :
{
}
-DWARFMappedHash::DIEInfo::DIEInfo (dw_offset_t o, dw_tag_t t, uint32_t f, uint32_t h) :
+DWARFMappedHash::DIEInfo::DIEInfo (dw_offset_t c,
+ dw_offset_t o,
+ dw_tag_t t,
+ uint32_t f,
+ uint32_t h) :
+ cu_offset (c),
offset (o),
tag (t),
type_flags (f),
OpenPOWER on IntegriCloud