LLDB mainline
|
#include <NameToDIE.h>
Public Member Functions | |
NameToDIE () | |
~NameToDIE ()=default | |
void | Dump (Stream *s) |
void | Insert (ConstString name, const DIERef &die_ref) |
void | Append (const NameToDIE &other) |
void | Finalize () |
bool | Find (ConstString name, llvm::function_ref< bool(DIERef ref)> callback) const |
bool | Find (const RegularExpression ®ex, llvm::function_ref< bool(DIERef ref)> callback) const |
void | FindAllEntriesForUnit (DWARFUnit &unit, llvm::function_ref< bool(DIERef ref)> callback) const |
unit must be the skeleton unit if possible, not GetNonSkeletonUnit(). | |
void | ForEach (std::function< bool(ConstString name, const DIERef &die_ref)> const &callback) const |
bool | Decode (const DataExtractor &data, lldb::offset_t *offset_ptr, const StringTableReader &strtab) |
Decode a serialized version of this object from data. | |
void | Encode (DataEncoder &encoder, ConstStringTable &strtab) const |
Encode this object into a data encoder object. | |
bool | operator== (const NameToDIE &rhs) const |
Used for unit testing the encoding and decoding. | |
bool | IsEmpty () const |
void | Clear () |
Protected Attributes | |
UniqueCStringMap< DIERef > | m_map |
Definition at line 23 of file NameToDIE.h.
|
inline |
Definition at line 25 of file NameToDIE.h.
|
default |
void NameToDIE::Append | ( | const NameToDIE & | other | ) |
Definition at line 87 of file NameToDIE.cpp.
References m_map.
Referenced by lldb_private::plugin::dwarf::ManualDWARFIndex::Index().
|
inline |
Definition at line 86 of file NameToDIE.h.
References m_map.
bool NameToDIE::Decode | ( | const DataExtractor & | data, |
lldb::offset_t * | offset_ptr, | ||
const StringTableReader & | strtab | ||
) |
Decode a serialized version of this object from data.
data | The decoder object that references the serialized data. |
offset_ptr | A pointer that contains the offset from which the data will be decoded from that gets updated as data gets decoded. |
strtab | All strings in cache files are put into string tables for efficiency and cache file size reduction. Strings are stored as uint32_t string table offsets in the cache data. |
Definition at line 97 of file NameToDIE.cpp.
References lldb_private::plugin::dwarf::DIERef::Decode(), lldb_private::StringTableReader::Get(), lldb_private::DataExtractor::GetData(), lldb_private::DataExtractor::GetU32(), kIdentifierNameToDIE(), and m_map.
Referenced by lldb_private::plugin::dwarf::ManualDWARFIndex::IndexSet::Decode().
void NameToDIE::Dump | ( | Stream * | s | ) |
Definition at line 68 of file NameToDIE.cpp.
References lldb_private::Stream::Format(), and m_map.
Referenced by lldb_private::plugin::dwarf::ManualDWARFIndex::Dump().
void NameToDIE::Encode | ( | DataEncoder & | encoder, |
ConstStringTable & | strtab | ||
) | const |
Encode this object into a data encoder object.
This allows this object to be serialized to disk.
encoder | A data encoder object that serialized bytes will be encoded into. |
strtab | All strings in cache files are put into string tables for efficiency and cache file size reduction. Strings are stored as uint32_t string table offsets in the cache data. |
Definition at line 128 of file NameToDIE.cpp.
References lldb_private::ConstStringTable::Add(), lldb_private::DataEncoder::AppendData(), lldb_private::DataEncoder::AppendU32(), kIdentifierNameToDIE(), and m_map.
void NameToDIE::Finalize | ( | ) |
Definition at line 25 of file NameToDIE.cpp.
References m_map.
Referenced by lldb_private::plugin::dwarf::ManualDWARFIndex::Index().
bool NameToDIE::Find | ( | const RegularExpression & | regex, |
llvm::function_ref< bool(DIERef ref)> | callback | ||
) | const |
Definition at line 42 of file NameToDIE.cpp.
References lldb_private::RegularExpression::Execute(), and m_map.
bool NameToDIE::Find | ( | ConstString | name, |
llvm::function_ref< bool(DIERef ref)> | callback | ||
) | const |
Definition at line 34 of file NameToDIE.cpp.
References m_map.
Referenced by lldb_private::plugin::dwarf::ManualDWARFIndex::GetCompleteObjCClass(), lldb_private::plugin::dwarf::ManualDWARFIndex::GetFunctions(), lldb_private::plugin::dwarf::ManualDWARFIndex::GetGlobalVariables(), lldb_private::plugin::dwarf::ManualDWARFIndex::GetNamespaces(), lldb_private::plugin::dwarf::ManualDWARFIndex::GetObjCMethods(), and lldb_private::plugin::dwarf::ManualDWARFIndex::GetTypes().
void NameToDIE::FindAllEntriesForUnit | ( | DWARFUnit & | unit, |
llvm::function_ref< bool(DIERef ref)> | callback | ||
) | const |
unit must be the skeleton unit if possible, not GetNonSkeletonUnit().
Definition at line 52 of file NameToDIE.cpp.
References lldb_private::plugin::dwarf::DIERef::die_offset(), lldb_private::plugin::dwarf::DIERef::file_index(), lldb_private::plugin::dwarf::DWARFUnit::GetDebugSection(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetFileIndex(), lldb_private::plugin::dwarf::DWARFUnit::GetNextUnitOffset(), lldb_private::plugin::dwarf::DWARFUnit::GetNonSkeletonUnit(), lldb_private::plugin::dwarf::DWARFUnit::GetOffset(), lldb_private::plugin::dwarf::DWARFUnit::GetSymbolFileDWARF(), m_map, and lldb_private::plugin::dwarf::DIERef::section().
Referenced by lldb_private::plugin::dwarf::ManualDWARFIndex::GetGlobalVariables().
void NameToDIE::ForEach | ( | std::function< bool(ConstString name, const DIERef &die_ref)> const & | callback | ) | const |
Definition at line 76 of file NameToDIE.cpp.
References m_map.
void NameToDIE::Insert | ( | ConstString | name, |
const DIERef & | die_ref | ||
) |
Definition at line 30 of file NameToDIE.cpp.
References m_map.
Referenced by lldb_private::plugin::dwarf::ManualDWARFIndex::IndexUnitImpl().
|
inline |
Definition at line 84 of file NameToDIE.h.
References m_map.
bool NameToDIE::operator== | ( | const NameToDIE & | rhs | ) | const |
Used for unit testing the encoding and decoding.
Definition at line 139 of file NameToDIE.cpp.
References m_map.
|
protected |
Definition at line 89 of file NameToDIE.h.
Referenced by Append(), Clear(), Decode(), Dump(), Encode(), Finalize(), Find(), FindAllEntriesForUnit(), ForEach(), Insert(), IsEmpty(), and operator==().