LLDB  mainline
Public Member Functions | Protected Attributes | List of all members
NameToDIE Class Reference

#include <NameToDIE.h>

Collaboration diagram for NameToDIE:
Collaboration graph
[legend]

Public Member Functions

 NameToDIE ()
 
 ~NameToDIE ()=default
 
void Dump (lldb_private::Stream *s)
 
void Insert (lldb_private::ConstString name, const DIERef &die_ref)
 
void Append (const NameToDIE &other)
 
void Finalize ()
 
bool Find (lldb_private::ConstString name, llvm::function_ref< bool(DIERef ref)> callback) const
 
bool Find (const lldb_private::RegularExpression &regex, 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(). More...
 
void ForEach (std::function< bool(lldb_private::ConstString name, const DIERef &die_ref)> const &callback) const
 
bool Decode (const lldb_private::DataExtractor &data, lldb::offset_t *offset_ptr, const lldb_private::StringTableReader &strtab)
 Decode a serialized version of this object from data. More...
 
void Encode (lldb_private::DataEncoder &encoder, lldb_private::ConstStringTable &strtab) const
 Encode this object into a data encoder object. More...
 
bool operator== (const NameToDIE &rhs) const
 Used for unit testing the encoding and decoding. More...
 
bool IsEmpty () const
 
void Clear ()
 

Protected Attributes

lldb_private::UniqueCStringMap< DIERefm_map
 

Detailed Description

Definition at line 21 of file NameToDIE.h.

Constructor & Destructor Documentation

◆ NameToDIE()

NameToDIE::NameToDIE ( )
inline

Definition at line 23 of file NameToDIE.h.

◆ ~NameToDIE()

NameToDIE::~NameToDIE ( )
default

Member Function Documentation

◆ Append()

void NameToDIE::Append ( const NameToDIE other)

◆ Clear()

void NameToDIE::Clear ( )
inline

Definition at line 87 of file NameToDIE.h.

References lldb_private::UniqueCStringMap< T >::Clear(), and m_map.

◆ Decode()

bool NameToDIE::Decode ( const lldb_private::DataExtractor data,
lldb::offset_t offset_ptr,
const lldb_private::StringTableReader strtab 
)

Decode a serialized version of this object from data.

Parameters
dataThe decoder object that references the serialized data.
offset_ptrA pointer that contains the offset from which the data will be decoded from that gets updated as data gets decoded.
strtabAll 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 96 of file NameToDIE.cpp.

References DIERef::Decode(), lldb_private::StringTableReader::Get(), lldb_private::DataExtractor::GetData(), lldb_private::DataExtractor::GetU32(), and kIdentifierNameToDIE().

◆ Dump()

void NameToDIE::Dump ( lldb_private::Stream s)

Definition at line 67 of file NameToDIE.cpp.

References lldb_private::Stream::Format().

◆ Encode()

void NameToDIE::Encode ( lldb_private::DataEncoder &  encoder,
lldb_private::ConstStringTable strtab 
) const

Encode this object into a data encoder object.

This allows this object to be serialized to disk.

Parameters
encoderA data encoder object that serialized bytes will be encoded into.
strtabAll 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 127 of file NameToDIE.cpp.

References lldb_private::ConstStringTable::Add(), and kIdentifierNameToDIE().

◆ Finalize()

void NameToDIE::Finalize ( )

Definition at line 23 of file NameToDIE.cpp.

Referenced by lldb_private::ManualDWARFIndex::Index().

◆ Find() [1/2]

bool NameToDIE::Find ( const lldb_private::RegularExpression regex,
llvm::function_ref< bool(DIERef ref)>  callback 
) const

Definition at line 40 of file NameToDIE.cpp.

References lldb_private::RegularExpression::Execute().

◆ Find() [2/2]

bool NameToDIE::Find ( lldb_private::ConstString  name,
llvm::function_ref< bool(DIERef ref)>  callback 
) const

Definition at line 32 of file NameToDIE.cpp.

◆ FindAllEntriesForUnit()

void NameToDIE::FindAllEntriesForUnit ( DWARFUnit unit,
llvm::function_ref< bool(DIERef ref)>  callback 
) const

◆ ForEach()

void NameToDIE::ForEach ( std::function< bool(lldb_private::ConstString name, const DIERef &die_ref)> const &  callback) const

Definition at line 75 of file NameToDIE.cpp.

◆ Insert()

void NameToDIE::Insert ( lldb_private::ConstString  name,
const DIERef die_ref 
)

Definition at line 28 of file NameToDIE.cpp.

◆ IsEmpty()

bool NameToDIE::IsEmpty ( ) const
inline

Definition at line 85 of file NameToDIE.h.

References lldb_private::UniqueCStringMap< T >::IsEmpty(), and m_map.

◆ operator==()

bool NameToDIE::operator== ( const NameToDIE rhs) const

Member Data Documentation

◆ m_map

lldb_private::UniqueCStringMap<DIERef> NameToDIE::m_map
protected

Definition at line 90 of file NameToDIE.h.

Referenced by Append(), Clear(), IsEmpty(), and operator==().


The documentation for this class was generated from the following files: