LLDB mainline
|
#include <Symbol.h>
Public Member Functions | |
Symbol () | |
Symbol (uint32_t symID, llvm::StringRef name, lldb::SymbolType type, bool external, bool is_debug, bool is_trampoline, bool is_artificial, const lldb::SectionSP §ion_sp, lldb::addr_t value, lldb::addr_t size, bool size_is_valid, bool contains_linker_annotations, uint32_t flags) | |
Symbol (uint32_t symID, const Mangled &mangled, lldb::SymbolType type, bool external, bool is_debug, bool is_trampoline, bool is_artificial, const AddressRange &range, bool size_is_valid, bool contains_linker_annotations, uint32_t flags) | |
Symbol (const Symbol &rhs) | |
const Symbol & | operator= (const Symbol &rhs) |
void | Clear () |
bool | Compare (ConstString name, lldb::SymbolType type) const |
void | Dump (Stream *s, Target *target, uint32_t index, Mangled::NamePreference name_preference=Mangled::ePreferDemangled) const |
bool | ValueIsAddress () const |
Address & | GetAddressRef () |
const Address & | GetAddressRef () const |
lldb::addr_t | GetFileAddress () const |
lldb::addr_t | GetLoadAddress (Target *target) const |
Address | GetAddress () const |
uint64_t | GetRawValue () const |
Get the raw value of the symbol from the symbol table. | |
uint64_t | GetIntegerValue (uint64_t fail_value=0) const |
lldb::addr_t | ResolveCallableAddress (Target &target) const |
ConstString | GetName () const |
ConstString | GetNameNoArguments () const |
ConstString | GetDisplayName () const |
uint32_t | GetID () const |
lldb::LanguageType | GetLanguage () const |
void | SetID (uint32_t uid) |
Mangled & | GetMangled () |
const Mangled & | GetMangled () const |
ConstString | GetReExportedSymbolName () const |
FileSpec | GetReExportedSymbolSharedLibrary () const |
void | SetReExportedSymbolName (ConstString name) |
bool | SetReExportedSymbolSharedLibrary (const FileSpec &fspec) |
Symbol * | ResolveReExportedSymbol (Target &target) const |
uint32_t | GetSiblingIndex () const |
lldb::SymbolType | GetType () const |
void | SetType (lldb::SymbolType type) |
const char * | GetTypeAsString () const |
uint32_t | GetFlags () const |
void | SetFlags (uint32_t flags) |
void | GetDescription (Stream *s, lldb::DescriptionLevel level, Target *target, std::optional< Stream::HighlightSettings > settings=std::nullopt) const |
bool | IsSynthetic () const |
bool | IsSyntheticWithAutoGeneratedName () const |
void | SetIsSynthetic (bool b) |
bool | GetSizeIsSynthesized () const |
void | SetSizeIsSynthesized (bool b) |
bool | IsDebug () const |
void | SetDebug (bool b) |
bool | IsExternal () const |
void | SetExternal (bool b) |
bool | IsTrampoline () const |
bool | IsIndirect () const |
bool | IsWeak () const |
void | SetIsWeak (bool b) |
bool | GetByteSizeIsValid () const |
lldb::addr_t | GetByteSize () const |
void | SetByteSize (lldb::addr_t size) |
bool | GetSizeIsSibling () const |
void | SetSizeIsSibling (bool b) |
uint32_t | GetPrologueByteSize () |
bool | GetDemangledNameIsSynthesized () const |
void | SetDemangledNameIsSynthesized (bool b) |
bool | ContainsLinkerAnnotations () const |
void | SetContainsLinkerAnnotations (bool b) |
void | CalculateSymbolContext (SymbolContext *sc) override |
Reconstruct the object's symbol context into sc. | |
lldb::ModuleSP | CalculateSymbolContextModule () override |
Symbol * | CalculateSymbolContextSymbol () override |
void | DumpSymbolContext (Stream *s) override |
Dump the object's symbol context to the stream s. | |
lldb::DisassemblerSP | GetInstructions (const ExecutionContext &exe_ctx, const char *flavor, bool prefer_file_cache) |
bool | GetDisassembly (const ExecutionContext &exe_ctx, const char *flavor, bool prefer_file_cache, Stream &strm) |
bool | ContainsFileAddress (lldb::addr_t file_addr) const |
bool | Decode (const DataExtractor &data, lldb::offset_t *offset_ptr, const SectionList *section_list, 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 Symbol &rhs) const |
Public Member Functions inherited from lldb_private::SymbolContextScope | |
virtual | ~SymbolContextScope ()=default |
virtual CompileUnit * | CalculateSymbolContextCompileUnit () |
virtual Function * | CalculateSymbolContextFunction () |
virtual Block * | CalculateSymbolContextBlock () |
Static Public Member Functions | |
static llvm::Expected< Symbol > | FromJSON (const JSONSymbol &symbol, SectionList *section_list) |
static llvm::StringRef | GetSyntheticSymbolPrefix () |
static const char * | GetTypeAsString (lldb::SymbolType symbol_type) |
static lldb::SymbolType | GetTypeFromString (const char *str) |
Protected Member Functions | |
Symbol * | ResolveReExportedSymbolInModuleSpec (Target &target, ConstString &reexport_name, lldb_private::ModuleSpec &module_spec, lldb_private::ModuleList &seen_modules) const |
void | SynthesizeNameIfNeeded () const |
Protected Attributes | |
uint32_t | m_uid |
uint16_t | m_type_data = 0 |
uint16_t | m_type_data_resolved: 1 |
uint16_t | m_is_synthetic: 1 |
uint16_t | m_is_debug: 1 |
uint16_t | m_is_external: 1 |
uint16_t | m_size_is_sibling: 1 |
uint16_t | m_size_is_synthesized: 1 |
uint16_t | m_size_is_valid: 1 |
uint16_t | m_demangled_is_synthesized: 1 |
uint16_t | m_contains_linker_annotations: 1 |
uint16_t | m_is_weak: 1 |
uint16_t | m_type: 6 |
Mangled | m_mangled |
AddressRange | m_addr_range |
uint32_t | m_flags = 0 |
Symbol::Symbol | ( | ) |
Definition at line 29 of file Symbol.cpp.
References lldb::eSymbolTypeInvalid, m_addr_range, m_contains_linker_annotations, m_demangled_is_synthesized, m_is_debug, m_is_external, m_is_synthetic, m_is_weak, m_mangled, m_size_is_sibling, m_size_is_synthesized, m_size_is_valid, m_type, and m_type_data_resolved.
Referenced by CalculateSymbolContextSymbol(), FromJSON(), operator=(), operator==(), ResolveCallableAddress(), ResolveReExportedSymbol(), ResolveReExportedSymbolInModuleSpec(), and Symbol().
Symbol::Symbol | ( | uint32_t | symID, |
llvm::StringRef | name, | ||
lldb::SymbolType | type, | ||
bool | external, | ||
bool | is_debug, | ||
bool | is_trampoline, | ||
bool | is_artificial, | ||
const lldb::SectionSP & | section_sp, | ||
lldb::addr_t | value, | ||
lldb::addr_t | size, | ||
bool | size_is_valid, | ||
bool | contains_linker_annotations, | ||
uint32_t | flags ) |
Definition at line 37 of file Symbol.cpp.
References m_addr_range, m_contains_linker_annotations, m_demangled_is_synthesized, m_flags, m_is_debug, m_is_external, m_is_synthetic, m_is_weak, m_mangled, m_size_is_sibling, m_size_is_synthesized, m_size_is_valid, m_type, m_type_data_resolved, and m_uid.
Symbol::Symbol | ( | uint32_t | symID, |
const Mangled & | mangled, | ||
lldb::SymbolType | type, | ||
bool | external, | ||
bool | is_debug, | ||
bool | is_trampoline, | ||
bool | is_artificial, | ||
const AddressRange & | range, | ||
bool | size_is_valid, | ||
bool | contains_linker_annotations, | ||
uint32_t | flags ) |
Definition at line 51 of file Symbol.cpp.
References GetByteSize(), m_addr_range, m_contains_linker_annotations, m_demangled_is_synthesized, m_flags, m_is_debug, m_is_external, m_is_synthetic, m_is_weak, m_mangled, m_size_is_sibling, m_size_is_synthesized, m_size_is_valid, m_type, m_type_data_resolved, and m_uid.
Symbol::Symbol | ( | const Symbol & | rhs | ) |
Definition at line 66 of file Symbol.cpp.
References m_addr_range, m_contains_linker_annotations, m_demangled_is_synthesized, m_flags, m_is_debug, m_is_external, m_is_synthetic, m_is_weak, m_mangled, m_size_is_sibling, m_size_is_synthesized, m_size_is_valid, m_type, m_type_data, m_type_data_resolved, m_uid, and Symbol().
|
overridevirtual |
Reconstruct the object's symbol context into sc.
The object should fill in as much of the SymbolContext as it can so function calls that require a symbol context can be made for the given object.
[out] | sc | A symbol context object pointer that gets filled in. |
Implements lldb_private::SymbolContextScope.
Definition at line 399 of file Symbol.cpp.
References GetAddressRef(), lldb_private::Address::GetModule(), lldb_private::SymbolContext::module_sp, lldb_private::SymbolContext::symbol, and ValueIsAddress().
|
overridevirtual |
Reimplemented from lldb_private::SymbolContextScope.
Definition at line 408 of file Symbol.cpp.
References GetAddressRef(), lldb_private::Address::GetModule(), and ValueIsAddress().
Referenced by GetSymbolDeclarationFromAddress(), and lldb_private::ItaniumABILanguageRuntime::GetTypeInfo().
|
overridevirtual |
Reimplemented from lldb_private::SymbolContextScope.
Definition at line 414 of file Symbol.cpp.
References Symbol().
Referenced by lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan().
void Symbol::Clear | ( | ) |
Definition at line 146 of file Symbol.cpp.
References lldb::eSymbolTypeInvalid, m_addr_range, m_contains_linker_annotations, m_demangled_is_synthesized, m_flags, m_is_debug, m_is_external, m_is_synthetic, m_is_weak, m_mangled, m_size_is_sibling, m_size_is_synthesized, m_size_is_valid, m_type, m_type_data, m_type_data_resolved, m_uid, and UINT32_MAX.
Referenced by ObjectFileMachO::ParseSymtab().
bool Symbol::Compare | ( | ConstString | name, |
lldb::SymbolType | type ) const |
Definition at line 386 of file Symbol.cpp.
References lldb::eSymbolTypeAny, lldb_private::Mangled::GetDemangledName(), GetMangled(), lldb_private::Mangled::GetMangledName(), and m_type.
Referenced by lldb_private::Symtab::FindFirstSymbolWithNameAndType(), and lldb_private::Debugger::FormatDisassemblerAddress().
bool Symbol::ContainsFileAddress | ( | lldb::addr_t | file_addr | ) | const |
Definition at line 579 of file Symbol.cpp.
References m_addr_range.
Referenced by lldb_private::Symtab::FindSymbolContainingFileAddress(), and lldb_private::Symtab::ForEachSymbolContainingFileAddress().
|
inline |
Definition at line 232 of file Symbol.h.
References m_contains_linker_annotations.
Referenced by lldb_private::Symtab::InitNameIndexes().
bool Symbol::Decode | ( | const DataExtractor & | data, |
lldb::offset_t * | offset_ptr, | ||
const SectionList * | section_list, | ||
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. |
section_list | A section list that allows lldb_private::Address objects to be filled in. The address information for symbols are serilized as file addresses and must be converted into Address objects with the right section and offset. |
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 612 of file Symbol.cpp.
References lldb_private::DataExtractor::GetU16(), lldb_private::DataExtractor::GetU32(), lldb_private::DataExtractor::GetU64(), lldb_private::DataExtractor::GetU8(), m_addr_range, m_contains_linker_annotations, m_demangled_is_synthesized, m_flags, m_is_debug, m_is_external, m_is_synthetic, m_is_weak, m_mangled, m_size_is_sibling, m_size_is_synthesized, m_size_is_valid, m_type, m_type_data, m_type_data_resolved, m_uid, and lldb_private::DataExtractor::ValidOffsetForDataOfSize().
void Symbol::Dump | ( | Stream * | s, |
Target * | target, | ||
uint32_t | index, | ||
Mangled::NamePreference | name_preference = Mangled::ePreferDemangled ) const |
Definition at line 266 of file Symbol.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::Address::DumpStyleFileAddress, lldb_private::Address::DumpStyleLoadAddress, lldb::eSymbolTypeReExported, GetByteSize(), lldb_private::ConstString::GetCString(), GetID(), GetMangled(), lldb_private::Mangled::GetName(), GetReExportedSymbolName(), GetTypeAsString(), m_addr_range, m_flags, m_is_debug, m_is_external, m_is_synthetic, m_size_is_sibling, m_type, lldb_private::Stream::Printf(), lldb_private::Stream::PutChar(), and ValueIsAddress().
Referenced by lldb_private::Symtab::Dump().
|
overridevirtual |
Dump the object's symbol context to the stream s.
The object should dump its symbol context to the stream s. This function is widely used in the DumpDebug and verbose output for lldb objects.
[in] | s | The stream to which to dump the object's symbol context. |
Implements lldb_private::SymbolContextScope.
Definition at line 416 of file Symbol.cpp.
References GetAddressRef(), GetID(), lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), and ValueIsAddress().
void Symbol::Encode | ( | DataEncoder & | file, |
ConstStringTable & | strtab ) const |
Encode this object into a data encoder object.
The encoding format for the symbol is as follows:
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. |
uint32_t m_uid; uint16_t m_type_data; uint16_t bitfield_data; Mangled mangled; uint8_t is_addr; uint64_t file_addr_or_value; uint64_t size; uint32_t flags;
The only tricky thing in this encoding is encoding all of the bits in the bitfields. We use a trick to store all bitfields as a 16 bit value and we do the same thing when decoding the symbol. There are test that ensure this encoding works for each individual bit. Everything else is very easy to store.
Definition at line 665 of file Symbol.cpp.
References lldb_private::DataEncoder::AppendU16(), lldb_private::DataEncoder::AppendU32(), lldb_private::DataEncoder::AppendU64(), lldb_private::DataEncoder::AppendU8(), m_addr_range, m_contains_linker_annotations, m_demangled_is_synthesized, m_flags, m_is_debug, m_is_external, m_is_synthetic, m_is_weak, m_mangled, m_size_is_sibling, m_size_is_synthesized, m_size_is_valid, m_type, m_type_data, m_type_data_resolved, and m_uid.
|
static |
Definition at line 101 of file Symbol.cpp.
References lldb_private::JSONSymbol::address, lldb::eSymbolTypeAny, lldb_private::SectionList::FindSectionContainingFileAddress(), lldb_private::JSONSymbol::id, lldb_private::JSONSymbol::name, lldb_private::JSONSymbol::size, Symbol(), lldb_private::JSONSymbol::type, and lldb_private::JSONSymbol::value.
Referenced by lldb_private::ObjectFileJSON::ParseSymtab().
|
inline |
Definition at line 89 of file Symbol.h.
References m_addr_range, and ValueIsAddress().
Referenced by lldb_private::ClangExpressionDeclMap::AddOneFunction(), lldb_private::ClangExpressionDeclMap::AddOneGenericVariable(), lldb_private::AppleObjCTrampolineHandler::AppleObjCTrampolineHandler(), lldb_private::Process::CreateBreakpointSite(), lldb_private::ThreadPlanShouldStopHere::DefaultStepFromHereCallback(), findSymbolAddress(), lldb_private::ArchitectureMips::GetBreakableLoadAddress(), lldb_private::CommandObjectDisassemble::GetCurrentFunctionRanges(), ObjectFileMachO::GetEntryPointAddress(), lldb_private::ItaniumABILanguageRuntime::GetExceptionObjectForThread(), lldb_private::breakpad::SymbolFileBreakpad::GetParameterStackSize(), lldb_private::AppleObjCRuntime::GetPrintForDebuggerAddr(), lldb_private::DynamicLoaderDarwin::GetPthreadSetSpecificAddress(), lldb_private::StackFrameRecognizerManager::GetRecognizerForFrame(), lldb_private::DynamicLoaderDarwin::GetStartAddress(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), JITLoaderGDB::GetSymbolAddress(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::InitializeVTableSymbols(), DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded(), DynamicLoaderFreeBSDKernel::LoadKernelModules(), lldb_private::SymbolFileCTF::ParseFunctions(), SymbolFileSymtab::ParseFunctions(), DynamicLoaderFreeBSDKernel::ReadAllKmods(), ResolveCallableAddress(), DYLDRendezvous::ResolveRendezvousAddress(), lldb_private::BreakpointResolverName::SearchCallback(), and lldb_private::ThreadPlanStepInRange::ShouldStop().
|
inline |
Definition at line 73 of file Symbol.h.
References m_addr_range.
Referenced by lldb_private::InstrumentationRuntimeMainThreadChecker::Activate(), lldb_private::InstrumentationRuntimeTSan::Activate(), lldb_private::InstrumentationRuntimeUBSan::Activate(), DynamicLoaderPOSIXDYLD::AlwaysRelyOnEHUnwindInfo(), lldb_private::DynamicLoaderDarwin::AlwaysRelyOnEHUnwindInfo(), ObjectFilePECOFF::AppendFromCOFFSymbolTable(), ObjectFilePECOFF::AppendFromExportTable(), lldb_private::SymbolContextList::AppendIfUnique(), lldb_private::AppleObjCTrampolineHandler::AppleObjCTrampolineHandler(), ApplyELF32ABS32RelRelocation(), ApplyELF64ABS32Relocation(), ApplyELF64ABS64Relocation(), ObjectFileELF::ApplyRelocations(), CalculateSymbolContext(), CalculateSymbolContextModule(), lldb_private::Disassembler::Disassemble(), lldb_private::Address::Dump(), DumpAddressOffsetFromFunction(), DumpSymbolContext(), ExtractRuntimeGlobalSymbol(), lldb_private::Module::FindFunctions(), fixupExternalAddrZeroVariable(), lldb_private::ObjectFile::GetAddressClass(), ObjectFileMachO::GetAddressClass(), DynamicLoaderMacOS::GetDyldLockVariableAddressFromModule(), GetFileAddress(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(), lldb_private::AppleObjCRuntimeV1::GetISAHashTablePointer(), GetLoadAddress(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::InitOSO(), LookupSymbolInModule(), SymbolFileSymtab::ParseFunctions(), ObjectFileCOFF::ParseSymtab(), ObjectFileELF::ParseSymtab(), ObjectFileMachO::ParseSymtab(), ObjectFileXCOFF::ParseSymtab(), and lldb_private::ReportRetriever::SetupBreakpoint().
|
inline |
Definition at line 75 of file Symbol.h.
References m_addr_range.
lldb::addr_t Symbol::GetByteSize | ( | ) | const |
Definition at line 431 of file Symbol.cpp.
References m_addr_range.
Referenced by lldb_private::ThreadPlanShouldStopHere::DefaultStepFromHereCallback(), lldb_private::Disassembler::Disassemble(), Dump(), lldb_private::CommandObjectDisassemble::GetCurrentFunctionRanges(), GetDescription(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::InitOSO(), LookupSymbolInModule(), lldb_private::SymbolFileCTF::ParseFunctions(), SymbolFileSymtab::ParseFunctions(), ObjectFileMachO::ParseSymtab(), and Symbol().
|
inline |
Definition at line 209 of file Symbol.h.
References m_size_is_valid.
Referenced by LookupSymbolInModule(), and ObjectFileELF::ParseUnwindSymbols().
|
inline |
Definition at line 226 of file Symbol.h.
References m_demangled_is_synthesized.
void Symbol::GetDescription | ( | Stream * | s, |
lldb::DescriptionLevel | level, | ||
Target * | target, | ||
std::optional< Stream::HighlightSettings > | settings = std::nullopt ) const |
Definition at line 225 of file Symbol.cpp.
References lldb_private::Address::DumpStyleFileAddress, lldb_private::Address::DumpStyleLoadAddress, GetByteSize(), m_addr_range, m_mangled, m_size_is_sibling, m_uid, lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), lldb_private::Stream::PutCStringColorHighlighted(), and ValueIsAddress().
bool Symbol::GetDisassembly | ( | const ExecutionContext & | exe_ctx, |
const char * | flavor, | ||
bool | prefer_file_cache, | ||
Stream & | strm ) |
Definition at line 564 of file Symbol.cpp.
References GetInstructions().
ConstString Symbol::GetDisplayName | ( | ) | const |
Definition at line 169 of file Symbol.cpp.
References lldb_private::Mangled::GetDisplayDemangledName(), and GetMangled().
Referenced by ObjectFilePECOFF::AppendFromExportTable(), lldb_private::StackFrame::GetDisplayFunctionName(), and LookupSymbolInModule().
lldb::addr_t Symbol::GetFileAddress | ( | ) | const |
Definition at line 497 of file Symbol.cpp.
References GetAddressRef(), lldb_private::Address::GetFileAddress(), LLDB_INVALID_ADDRESS, and ValueIsAddress().
Referenced by SymbolFilePDB::AddSymbols(), CreateDWARFExpression(), lldb_private::Symtab::FindSymbolAtFileAddress(), lldb_private::ArchitecturePPC64::GetBytesToSkip(), and lldb_private::SymbolFileCTF::ParseFunctions().
|
inline |
Definition at line 175 of file Symbol.h.
References m_flags.
Referenced by ObjectFileMachO::GetAddressClass(), and GetLocalEntryOffset().
|
inline |
Definition at line 137 of file Symbol.h.
References m_uid.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CalculateFrameVariableError(), lldb_private::StackID::Dump(), Dump(), DumpSymbolContext(), lldb_private::FormatEntity::Format(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::InitOSO(), and ObjectFileELF::ParseUnwindSymbols().
lldb::DisassemblerSP Symbol::GetInstructions | ( | const ExecutionContext & | exe_ctx, |
const char * | flavor, | ||
bool | prefer_file_cache ) |
Definition at line 552 of file Symbol.cpp.
References lldb_private::Disassembler::DisassembleRange(), lldb_private::ExecutionContext::GetTargetRef(), lldb_private::ExecutionContext::HasTargetScope(), and m_addr_range.
Referenced by GetDisassembly().
|
inline |
Definition at line 118 of file Symbol.h.
References m_addr_range, and ValueIsAddress().
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::InitOSO().
|
inline |
Definition at line 139 of file Symbol.h.
References GetMangled(), and lldb_private::Mangled::GuessLanguage().
Referenced by lldb_private::FormatEntity::Format(), FormatFunctionNameForLanguage(), and HandleFunctionNameWithArgs().
lldb::addr_t Symbol::GetLoadAddress | ( | Target * | target | ) | const |
Definition at line 504 of file Symbol.cpp.
References GetAddressRef(), lldb_private::Address::GetLoadAddress(), LLDB_INVALID_ADDRESS, and ValueIsAddress().
Referenced by lldb_private::Process::CreateBreakpointSite(), RemoteNXMapTable::Dump(), ProcessFreeBSDKernel::FindSymbol(), lldb_private::AppleObjCRuntimeV2::GetISAHashTablePointer(), lldb_private::AppleObjCRuntimeV2::GetValuesForGlobalCFBooleans(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::InitializeVTableSymbols(), DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(), SystemRuntimeMacOSX::ReadLibdispatchOffsetsAddress(), SystemRuntimeMacOSX::ReadLibdispatchTSDIndexesAddress(), and SystemRuntimeMacOSX::ReadLibpthreadOffsetsAddress().
|
inline |
Definition at line 147 of file Symbol.h.
References m_mangled, and SynthesizeNameIfNeeded().
Referenced by ObjectFilePECOFF::AppendFromCOFFSymbolTable(), ObjectFilePECOFF::AppendFromExportTable(), lldb_private::Symtab::AppendSymbolNamesToMap(), Compare(), Dump(), lldb_private::DynamicLoaderDarwin::FindEquivalentSymbols(), GetDisplayName(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(), GetLanguage(), GetName(), GetNameNoArguments(), DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan(), DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), GetSymbolDeclarationFromAddress(), lldb_private::ItaniumABILanguageRuntime::GetTypeInfo(), lldb_private::ItaniumABILanguageRuntime::GetVTableInfo(), lldb_private::StackFrame::GuessLanguage(), lldb_private::Symtab::InitNameIndexes(), lldb_private::CPPLanguageRuntime::IsSymbolARuntimeThunk(), lldb_private::SymbolFileCTF::ParseFunctions(), SymbolFileSymtab::ParseFunctions(), ObjectFileCOFF::ParseSymtab(), ObjectFileMachO::ParseSymtab(), ObjectFileXCOFF::ParseSymtab(), lldb_private::SymbolContextSpecifier::SymbolContextMatches(), and SymbolContextsMightBeEquivalent().
|
inline |
Definition at line 152 of file Symbol.h.
References m_mangled, and SynthesizeNameIfNeeded().
ConstString Symbol::GetName | ( | ) | const |
Definition at line 511 of file Symbol.cpp.
References GetMangled(), and lldb_private::Mangled::GetName().
Referenced by ApplyELF32ABS32RelRelocation(), lldb_private::Address::Dump(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), findSymbolAddress(), lldb_private::Debugger::FormatDisassemblerAddress(), lldb_private::BreakpointLocation::GetDescription(), lldb_private::CPlusPlusLanguage::GetFunctionDisplayName(), lldb_private::StackFrame::GetFunctionName(), lldb_private::SymbolFileOnDemand::GetParameterStackSize(), GetReExportedSymbolName(), lldb_private::AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(), lldb_private::CPPLanguageRuntime::GetStepThroughTrampolinePlan(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), GetSymbolNameFromAddress(), GetSymbolOrFunctionName(), HandleFunctionNameWithArgs(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::InitOSO(), lldb_private::formatters::LibcxxFunctionSummaryProvider(), SymbolFileSymtab::ParseCompileUnitAtIndex(), lldb_private::SymbolFileCTF::ParseFunctions(), DynamicLoaderMacOS::ProcessDidExec(), DynamicLoaderMacOSXDYLD::ProcessDidExec(), and lldb_private::Process::ResolveIndirectFunction().
ConstString Symbol::GetNameNoArguments | ( | ) | const |
Definition at line 513 of file Symbol.cpp.
References lldb_private::Mangled::ePreferDemangledWithoutArguments, GetMangled(), and lldb_private::Mangled::GetName().
uint32_t Symbol::GetPrologueByteSize | ( | ) |
Definition at line 313 of file Symbol.cpp.
References lldb_private::Address::CalculateSymbolContextFunction(), lldb::eSymbolTypeCode, lldb::eSymbolTypeResolver, lldb_private::AddressRange::GetByteSize(), lldb_private::Address::GetModule(), lldb_private::Function::GetPrologueByteSize(), lldb_private::LineEntry::line, lldb_private::SymbolContext::line_entry, m_addr_range, m_type, m_type_data, m_type_data_resolved, lldb_private::LineEntry::range, and lldb_private::Address::Slide().
Referenced by lldb_private::ArchitecturePPC64::GetBytesToSkip(), and lldb_private::ThreadPlanStepInRange::ShouldStop().
|
inline |
Get the raw value of the symbol from the symbol table.
If the symbol's value is an address, return the file address, else return the raw value that is stored in the m_addr_range. If the base address has no section, then getting the file address will return the correct value as it will return the offset in the base address which is the value.
Definition at line 110 of file Symbol.h.
References m_addr_range.
Referenced by LookupSymbolInModule().
ConstString Symbol::GetReExportedSymbolName | ( | ) | const |
Definition at line 173 of file Symbol.cpp.
References lldb::eSymbolTypeReExported, GetName(), m_addr_range, and m_type.
Referenced by Dump(), and ResolveReExportedSymbol().
FileSpec Symbol::GetReExportedSymbolSharedLibrary | ( | ) | const |
Definition at line 187 of file Symbol.cpp.
References lldb::eSymbolTypeReExported, m_addr_range, and m_type.
Referenced by ResolveReExportedSymbol().
uint32_t Symbol::GetSiblingIndex | ( | ) | const |
Definition at line 217 of file Symbol.cpp.
References m_addr_range, m_size_is_sibling, and UINT32_MAX.
Referenced by lldb_private::Symtab::GetParent(), and lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::InitOSO().
|
inline |
Definition at line 218 of file Symbol.h.
References m_size_is_sibling.
Referenced by SymbolFileSymtab::ParseFunctions().
|
inline |
Definition at line 189 of file Symbol.h.
References m_size_is_synthesized.
|
inlinestatic |
Definition at line 261 of file Symbol.h.
Referenced by lldb_private::Symtab::GetNameIndexes(), IsSyntheticWithAutoGeneratedName(), and SynthesizeNameIfNeeded().
|
inline |
Definition at line 169 of file Symbol.h.
References m_type.
Referenced by ObjectFilePECOFF::AppendFromCOFFSymbolTable(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::FindCompleteObjCDefinitionTypeForDIE(), lldb_private::Module::FindFunctions(), lldb_private::Symtab::FindFunctionSymbols(), lldb_private::Debugger::FormatDisassemblerAddress(), lldb_private::ObjectFile::GetAddressClass(), ObjectFileMachO::GetAddressClass(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), lldb_private::Symtab::InitNameIndexes(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::InitOSO(), lldb_private::ClangExpressionDeclMap::LookupFunction(), ObjectFileMachO::ParseSymtab(), and ResolveCallableAddress().
const char * Symbol::GetTypeAsString | ( | ) | const |
Definition at line 395 of file Symbol.cpp.
References GetTypeAsString(), and m_type.
Referenced by Dump(), lldb::SBSymbol::GetTypeAsString(), and GetTypeAsString().
|
static |
Definition at line 744 of file Symbol.cpp.
References ENUM_TO_CSTRING, lldb_private::Exception, and lldb_private::Invalid.
|
static |
Definition at line 779 of file Symbol.cpp.
References lldb::eSymbolTypeAbsolute, lldb::eSymbolTypeAdditional, lldb::eSymbolTypeBlock, lldb::eSymbolTypeCode, lldb::eSymbolTypeCommonBlock, lldb::eSymbolTypeCompiler, lldb::eSymbolTypeData, lldb::eSymbolTypeException, lldb::eSymbolTypeHeaderFile, lldb::eSymbolTypeInstrumentation, lldb::eSymbolTypeInvalid, lldb::eSymbolTypeLineEntry, lldb::eSymbolTypeLineHeader, lldb::eSymbolTypeLocal, lldb::eSymbolTypeObjCClass, lldb::eSymbolTypeObjCIVar, lldb::eSymbolTypeObjCMetaClass, lldb::eSymbolTypeObjectFile, lldb::eSymbolTypeParam, lldb::eSymbolTypeReExported, lldb::eSymbolTypeResolver, lldb::eSymbolTypeRuntime, lldb::eSymbolTypeScopeBegin, lldb::eSymbolTypeScopeEnd, lldb::eSymbolTypeSourceFile, lldb::eSymbolTypeTrampoline, lldb::eSymbolTypeUndefined, lldb::eSymbolTypeVariable, and lldb::eSymbolTypeVariableType.
Referenced by llvm::json::fromJSON(), and lldb::SBSymbol::GetTypeFromString().
|
inline |
Definition at line 193 of file Symbol.h.
References m_is_debug.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(), and lldb_private::Symtab::FileRangeToIndexMapCompare::rank().
|
inline |
Definition at line 197 of file Symbol.h.
References m_is_external.
Referenced by lldb_private::ClangExpressionDeclMap::LookupFunction(), and lldb_private::Symtab::FileRangeToIndexMapCompare::rank().
bool Symbol::IsIndirect | ( | ) | const |
Definition at line 223 of file Symbol.cpp.
References lldb::eSymbolTypeResolver, and m_type.
Referenced by lldb_private::ClangExpressionDeclMap::AddOneFunction(), lldb_private::Process::CreateBreakpointSite(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), and ResolveCallableAddress().
|
inline |
Definition at line 183 of file Symbol.h.
References m_is_synthetic.
Referenced by IsSyntheticWithAutoGeneratedName(), and lldb_private::Module::ResolveSymbolContextForAddress().
bool Symbol::IsSyntheticWithAutoGeneratedName | ( | ) | const |
Definition at line 583 of file Symbol.cpp.
References lldb_private::ConstString::GetStringRef(), GetSyntheticSymbolPrefix(), IsSynthetic(), and m_mangled.
Referenced by lldb_private::Symtab::InitNameIndexes().
bool Symbol::IsTrampoline | ( | ) | const |
Definition at line 221 of file Symbol.cpp.
References lldb::eSymbolTypeTrampoline, and m_type.
Referenced by DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan(), DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), and lldb_private::Symtab::InitNameIndexes().
|
inline |
Definition at line 205 of file Symbol.h.
References m_is_weak.
Referenced by lldb_private::Symtab::FileRangeToIndexMapCompare::rank().
Definition at line 78 of file Symbol.cpp.
References m_addr_range, m_contains_linker_annotations, m_demangled_is_synthesized, m_flags, m_is_debug, m_is_external, m_is_synthetic, m_is_weak, m_mangled, m_size_is_sibling, m_size_is_synthesized, m_size_is_valid, m_type, m_type_data, m_type_data_resolved, m_uid, and Symbol().
Definition at line 702 of file Symbol.cpp.
References lldb_private::AddressRange::GetBaseAddress(), lldb_private::AddressRange::GetByteSize(), m_addr_range, m_contains_linker_annotations, m_demangled_is_synthesized, m_flags, m_is_debug, m_is_external, m_is_synthetic, m_is_weak, m_mangled, m_size_is_sibling, m_size_is_synthesized, m_size_is_valid, m_type, m_type_data, m_type_data_resolved, m_uid, and Symbol().
lldb::addr_t Symbol::ResolveCallableAddress | ( | Target & | target | ) | const |
Definition at line 517 of file Symbol.cpp.
References lldb::eSymbolTypeReExported, lldb::eSymbolTypeUndefined, GetAddress(), lldb_private::Address::GetCallableLoadAddress(), lldb_private::Target::GetProcessSP(), GetType(), IsIndirect(), lldb_private::Address::IsValid(), LLDB_INVALID_ADDRESS, ResolveReExportedSymbol(), and Symbol().
Definition at line 483 of file Symbol.cpp.
References lldb_private::ModuleSpec::GetFileSpec(), GetReExportedSymbolName(), GetReExportedSymbolSharedLibrary(), ResolveReExportedSymbolInModuleSpec(), and Symbol().
Referenced by lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), lldb_private::ClangExpressionDeclMap::LookupFunction(), ResolveCallableAddress(), and lldb_private::BreakpointResolverName::SearchCallback().
|
protected |
Definition at line 433 of file Symbol.cpp.
References lldb_private::ModuleList::Append(), lldb_private::ModuleList::AppendIfNeeded(), lldb_private::FileSpec::ClearDirectory(), lldb::eSymbolTypeAny, lldb_private::ModuleList::FindFirstModule(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::FileSpecList::GetFileSpecAtIndex(), lldb_private::Target::GetImages(), lldb_private::FileSpecList::GetSize(), ResolveReExportedSymbolInModuleSpec(), and Symbol().
Referenced by ResolveReExportedSymbol(), and ResolveReExportedSymbolInModuleSpec().
|
inline |
Definition at line 213 of file Symbol.h.
References m_addr_range, and m_size_is_valid.
Referenced by lldb_private::Symtab::InitAddressIndexes(), ObjectFileMachO::ParseSymtab(), and ObjectFileELF::ParseUnwindSymbols().
|
inline |
Definition at line 235 of file Symbol.h.
References m_contains_linker_annotations.
|
inline |
Definition at line 195 of file Symbol.h.
References m_is_debug.
Referenced by ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 230 of file Symbol.h.
References m_demangled_is_synthesized.
Referenced by ObjectFilePECOFF::AppendFromExportTable(), and ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 199 of file Symbol.h.
References m_is_external.
Referenced by ObjectFilePECOFF::AppendFromCOFFSymbolTable(), ObjectFilePECOFF::AppendFromExportTable(), and ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 177 of file Symbol.h.
References m_flags.
Referenced by ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 145 of file Symbol.h.
References m_uid.
Referenced by ObjectFilePECOFF::AppendFromExportTable(), and ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 187 of file Symbol.h.
References m_is_synthetic.
Referenced by ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 207 of file Symbol.h.
References m_is_weak.
Referenced by ObjectFileELF::ParseSymbols(), and ObjectFileMachO::ParseSymtab().
void Symbol::SetReExportedSymbolName | ( | ConstString | name | ) |
Definition at line 199 of file Symbol.cpp.
References lldb::eSymbolTypeReExported, lldb_private::ConstString::GetCString(), m_addr_range, and SetType().
Referenced by ObjectFileMachO::ParseSymtab().
Definition at line 206 of file Symbol.cpp.
References lldb::eSymbolTypeReExported, lldb_private::ConstString::GetCString(), lldb_private::FileSpec::GetPath(), m_addr_range, and m_type.
Referenced by ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 220 of file Symbol.h.
References m_size_is_sibling.
Referenced by ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 191 of file Symbol.h.
References m_size_is_synthesized.
Referenced by lldb_private::Symtab::InitAddressIndexes(), and ObjectFileELF::ParseUnwindSymbols().
|
inline |
Definition at line 171 of file Symbol.h.
References m_type.
Referenced by ObjectFilePECOFF::AppendFromCOFFSymbolTable(), ObjectFilePECOFF::AppendFromExportTable(), ObjectFileCOFF::ParseSymtab(), ObjectFileMachO::ParseSymtab(), ObjectFileXCOFF::ParseSymtab(), and SetReExportedSymbolName().
|
protected |
Definition at line 592 of file Symbol.cpp.
References GetSyntheticSymbolPrefix(), m_addr_range, m_is_synthetic, and m_mangled.
Referenced by GetMangled(), and GetMangled().
bool Symbol::ValueIsAddress | ( | ) | const |
Definition at line 165 of file Symbol.cpp.
References m_addr_range.
Referenced by lldb_private::InstrumentationRuntimeMainThreadChecker::Activate(), lldb_private::InstrumentationRuntimeTSan::Activate(), lldb_private::InstrumentationRuntimeUBSan::Activate(), lldb_private::SymbolContextList::AppendIfUnique(), lldb_private::AppleObjCTrampolineHandler::AppleObjCTrampolineHandler(), CalculateSymbolContext(), CalculateSymbolContextModule(), lldb_private::ThreadPlanShouldStopHere::DefaultStepFromHereCallback(), lldb_private::Disassembler::Disassemble(), lldb_private::Address::Dump(), Dump(), DumpAddressOffsetFromFunction(), DumpSymbolContext(), ExtractRuntimeGlobalSymbol(), lldb_private::Module::FindFunctions(), fixupExternalAddrZeroVariable(), GetAddress(), lldb_private::ObjectFile::GetAddressClass(), ObjectFileMachO::GetAddressClass(), lldb_private::CommandObjectDisassemble::GetCurrentFunctionRanges(), GetDescription(), DynamicLoaderMacOS::GetDyldLockVariableAddressFromModule(), GetFileAddress(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(), GetIntegerValue(), lldb_private::AppleObjCRuntimeV1::GetISAHashTablePointer(), GetLoadAddress(), LookupSymbolInModule(), and lldb_private::ReportRetriever::SetupBreakpoint().
|
protected |
Definition at line 347 of file Symbol.h.
Referenced by Clear(), ContainsFileAddress(), Decode(), Dump(), Encode(), GetAddress(), GetAddressRef(), GetAddressRef(), GetByteSize(), GetDescription(), GetInstructions(), GetIntegerValue(), GetPrologueByteSize(), GetRawValue(), GetReExportedSymbolName(), GetReExportedSymbolSharedLibrary(), GetSiblingIndex(), operator=(), operator==(), SetByteSize(), SetReExportedSymbolName(), SetReExportedSymbolSharedLibrary(), Symbol(), Symbol(), Symbol(), Symbol(), SynthesizeNameIfNeeded(), and ValueIsAddress().
|
protected |
Definition at line 341 of file Symbol.h.
Referenced by Clear(), ContainsLinkerAnnotations(), Decode(), Encode(), operator=(), operator==(), SetContainsLinkerAnnotations(), Symbol(), Symbol(), Symbol(), and Symbol().
|
protected |
Definition at line 338 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetDemangledNameIsSynthesized(), operator=(), operator==(), SetDemangledNameIsSynthesized(), Symbol(), Symbol(), Symbol(), and Symbol().
|
protected |
Definition at line 350 of file Symbol.h.
Referenced by Clear(), Decode(), Dump(), Encode(), GetFlags(), operator=(), operator==(), SetFlags(), Symbol(), Symbol(), and Symbol().
|
protected |
Definition at line 329 of file Symbol.h.
Referenced by Clear(), Decode(), Dump(), Encode(), IsDebug(), operator=(), operator==(), SetDebug(), Symbol(), Symbol(), Symbol(), and Symbol().
|
protected |
Definition at line 331 of file Symbol.h.
Referenced by Clear(), Decode(), Dump(), Encode(), IsExternal(), operator=(), operator==(), SetExternal(), Symbol(), Symbol(), Symbol(), and Symbol().
|
protected |
Definition at line 326 of file Symbol.h.
Referenced by Clear(), Decode(), Dump(), Encode(), IsSynthetic(), operator=(), operator==(), SetIsSynthetic(), Symbol(), Symbol(), Symbol(), Symbol(), and SynthesizeNameIfNeeded().
|
protected |
Definition at line 344 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), IsWeak(), operator=(), operator==(), SetIsWeak(), Symbol(), Symbol(), Symbol(), and Symbol().
|
mutableprotected |
Definition at line 346 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetDescription(), GetMangled(), GetMangled(), IsSyntheticWithAutoGeneratedName(), operator=(), operator==(), Symbol(), Symbol(), Symbol(), Symbol(), and SynthesizeNameIfNeeded().
|
protected |
Definition at line 332 of file Symbol.h.
Referenced by Clear(), Decode(), Dump(), Encode(), GetDescription(), GetSiblingIndex(), GetSizeIsSibling(), operator=(), operator==(), SetSizeIsSibling(), Symbol(), Symbol(), Symbol(), and Symbol().
|
protected |
Definition at line 334 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetSizeIsSynthesized(), operator=(), operator==(), SetSizeIsSynthesized(), Symbol(), Symbol(), Symbol(), and Symbol().
|
protected |
Definition at line 337 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetByteSizeIsValid(), operator=(), operator==(), SetByteSize(), Symbol(), Symbol(), Symbol(), and Symbol().
|
protected |
Definition at line 345 of file Symbol.h.
Referenced by Clear(), Compare(), Decode(), Dump(), Encode(), GetPrologueByteSize(), GetReExportedSymbolName(), GetReExportedSymbolSharedLibrary(), GetType(), GetTypeAsString(), IsIndirect(), IsTrampoline(), operator=(), operator==(), SetReExportedSymbolSharedLibrary(), SetType(), Symbol(), Symbol(), Symbol(), and Symbol().
|
protected |
Definition at line 323 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetPrologueByteSize(), operator=(), operator==(), and Symbol().
|
protected |
Definition at line 324 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetPrologueByteSize(), operator=(), operator==(), Symbol(), Symbol(), Symbol(), and Symbol().
|
protected |
Definition at line 321 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetDescription(), GetID(), operator=(), operator==(), SetID(), Symbol(), Symbol(), and Symbol().