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) 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 |
![]() | |
virtual | ~SymbolContextScope ()=default |
virtual void | CalculateSymbolContext (SymbolContext *sc)=0 |
Reconstruct the object's symbol context into sc. | |
virtual lldb::ModuleSP | CalculateSymbolContextModule () |
virtual CompileUnit * | CalculateSymbolContextCompileUnit () |
virtual Function * | CalculateSymbolContextFunction () |
virtual Block * | CalculateSymbolContextBlock () |
virtual Symbol * | CalculateSymbolContextSymbol () |
virtual void | DumpSymbolContext (Stream *s)=0 |
Dump the object's symbol context to the stream s. | |
Static Public Member Functions | |
static llvm::Expected< Symbol > | FromJSON (const JSONSymbol &symbol, SectionList *section_list) |
static llvm::StringRef | GetSyntheticSymbolPrefix () |
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 27 of file Symbol.cpp.
Referenced by FromJSON().
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 35 of file Symbol.cpp.
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 49 of file Symbol.cpp.
Symbol::Symbol | ( | const Symbol & | rhs | ) |
Definition at line 64 of file Symbol.cpp.
|
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 432 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 441 of file Symbol.cpp.
References GetAddressRef(), lldb_private::Address::GetModule(), and ValueIsAddress().
Referenced by GetSymbolDeclarationFromAddress().
|
overridevirtual |
Reimplemented from lldb_private::SymbolContextScope.
Definition at line 447 of file Symbol.cpp.
Referenced by lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan().
void Symbol::Clear | ( | ) |
Definition at line 148 of file Symbol.cpp.
References lldb_private::AddressRange::Clear(), 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 382 of file Symbol.cpp.
References lldb::eSymbolTypeAny, GetMangled(), 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 612 of file Symbol.cpp.
References lldb_private::AddressRange::ContainsFileAddress(), and m_addr_range.
Referenced by lldb_private::Symtab::FindSymbolContainingFileAddress(), and lldb_private::Symtab::ForEachSymbolContainingFileAddress().
|
inline |
Definition at line 229 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 643 of file Symbol.cpp.
References lldb_private::Address::Clear(), lldb_private::AddressRange::GetBaseAddress(), 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, lldb_private::Address::ResolveAddressUsingFileSections(), lldb_private::AddressRange::SetByteSize(), lldb_private::Address::SetOffset(), 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 262 of file Symbol.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::Address::Dump(), lldb_private::Address::DumpStyleFileAddress, lldb_private::Address::DumpStyleLoadAddress, lldb::eSymbolTypeReExported, lldb_private::AddressRange::GetBaseAddress(), lldb_private::AddressRange::GetByteSize(), GetByteSize(), lldb_private::ConstString::GetCString(), GetID(), GetMangled(), lldb_private::Address::GetOffset(), 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 449 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 696 of file Symbol.cpp.
References lldb_private::AddressRange::GetBaseAddress(), lldb_private::AddressRange::GetByteSize(), lldb_private::Address::GetFileAddress(), lldb_private::Address::GetSection(), 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 99 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 87 of file Symbol.h.
References lldb_private::AddressRange::GetBaseAddress(), 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(), lldb_private::SymbolContext::FindBestGlobalDataSymbol(), 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::GetStepThroughTrampolinePlan(), JITLoaderGDB::GetSymbolAddress(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::InitializeVTableSymbols(), DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded(), SymbolFileSymtab::ParseFunctions(), ResolveCallableAddress(), DYLDRendezvous::ResolveRendezvousAddress(), lldb_private::BreakpointResolverName::SearchCallback(), and lldb_private::ThreadPlanStepInRange::ShouldStop().
|
inline |
Definition at line 71 of file Symbol.h.
References lldb_private::AddressRange::GetBaseAddress(), and m_addr_range.
Referenced by lldb_private::InstrumentationRuntimeASan::Activate(), lldb_private::InstrumentationRuntimeMainThreadChecker::Activate(), lldb_private::InstrumentationRuntimeTSan::Activate(), lldb_private::InstrumentationRuntimeUBSan::Activate(), lldb_private::DynamicLoaderDarwin::AlwaysRelyOnEHUnwindInfo(), DynamicLoaderPOSIXDYLD::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(), lldb_private::SymbolContext::DumpStopContext(), DumpSymbolContext(), ExtractRuntimeGlobalSymbol(), lldb_private::Module::FindFunctions(), lldb_private::ObjectFile::GetAddressClass(), ObjectFileMachO::GetAddressClass(), lldb_private::SymbolContext::GetAddressRange(), DynamicLoaderMacOS::GetDyldLockVariableAddressFromModule(), lldb::SBSymbol::GetEndAddress(), GetFileAddress(), SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(), lldb::SBSymbol::GetInstructions(), lldb_private::AppleObjCRuntimeV1::GetISAHashTablePointer(), GetLoadAddress(), lldb::SBSymbol::GetStartAddress(), SymbolFileDWARFDebugMap::InitOSO(), lldb_private::ThreadPlanStepRange::InSymbol(), LookupSymbolInModule(), SymbolFileSymtab::ParseFunctions(), ObjectFileCOFF::ParseSymtab(), ObjectFileELF::ParseSymtab(), ObjectFileMachO::ParseSymtab(), and SymbolFileDWARF::ParseVariableDIE().
|
inline |
Definition at line 73 of file Symbol.h.
References lldb_private::AddressRange::GetBaseAddress(), and m_addr_range.
lldb::addr_t Symbol::GetByteSize | ( | ) | const |
Definition at line 464 of file Symbol.cpp.
References lldb_private::AddressRange::GetByteSize(), and m_addr_range.
Referenced by lldb_private::ThreadPlanShouldStopHere::DefaultStepFromHereCallback(), lldb_private::Disassembler::Disassemble(), Dump(), lldb_private::SymbolContext::GetAddressRange(), lldb_private::CommandObjectDisassemble::GetCurrentFunctionRanges(), GetDescription(), lldb::SBSymbol::GetEndAddress(), SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(), lldb::SBSymbol::GetInstructions(), lldb::SBSymbol::GetSize(), SymbolFileDWARFDebugMap::InitOSO(), lldb_private::ThreadPlanStepRange::InSymbol(), LookupSymbolInModule(), and SymbolFileSymtab::ParseFunctions().
|
inline |
Definition at line 206 of file Symbol.h.
References m_size_is_valid.
Referenced by lldb::SBSymbol::GetSize(), LookupSymbolInModule(), and ObjectFileELF::ParseUnwindSymbols().
|
inline |
Definition at line 223 of file Symbol.h.
References m_demangled_is_synthesized.
Referenced by lldb_private::SymbolContext::FindBestGlobalDataSymbol().
void Symbol::GetDescription | ( | Stream * | s, |
lldb::DescriptionLevel | level, | ||
Target * | target | ||
) | const |
Definition at line 227 of file Symbol.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::Address::Dump(), lldb_private::AddressRange::Dump(), lldb_private::Address::DumpStyleFileAddress, lldb_private::Address::DumpStyleLoadAddress, lldb_private::AddressRange::GetBaseAddress(), GetByteSize(), GetMangled(), lldb_private::Address::GetOffset(), lldb_private::Address::GetSection(), m_addr_range, m_mangled, m_size_is_sibling, m_uid, lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), and ValueIsAddress().
Referenced by lldb_private::SymbolContext::FindBestGlobalDataSymbol(), lldb::SBSymbol::GetDescription(), and lldb_private::SymbolContext::GetDescription().
bool Symbol::GetDisassembly | ( | const ExecutionContext & | exe_ctx, |
const char * | flavor, | ||
bool | prefer_file_cache, | ||
Stream & | strm | ||
) |
Definition at line 597 of file Symbol.cpp.
References GetInstructions().
ConstString Symbol::GetDisplayName | ( | ) | const |
Definition at line 171 of file Symbol.cpp.
References GetMangled().
Referenced by ObjectFilePECOFF::AppendFromExportTable(), lldb::SBFrame::GetDisplayFunctionName(), and LookupSymbolInModule().
lldb::addr_t Symbol::GetFileAddress | ( | ) | const |
Definition at line 530 of file Symbol.cpp.
References GetAddressRef(), lldb_private::Address::GetFileAddress(), LLDB_INVALID_ADDRESS, and ValueIsAddress().
Referenced by SymbolFilePDB::AddSymbols(), lldb_private::Symtab::FindSymbolAtFileAddress(), and lldb_private::ArchitecturePPC64::GetBytesToSkip().
|
inline |
Definition at line 173 of file Symbol.h.
References m_flags.
Referenced by ObjectFileMachO::GetAddressClass(), and GetLocalEntryOffset().
|
inline |
Definition at line 135 of file Symbol.h.
References m_uid.
Referenced by SymbolFileDWARFDebugMap::CalculateFrameVariableError(), lldb_private::StackID::Dump(), Dump(), DumpSymbolContext(), lldb_private::FormatEntity::Format(), SymbolFileDWARFDebugMap::InitOSO(), ObjectFileELF::ParseUnwindSymbols(), and SynthesizeNameIfNeeded().
lldb::DisassemblerSP Symbol::GetInstructions | ( | const ExecutionContext & | exe_ctx, |
const char * | flavor, | ||
bool | prefer_file_cache | ||
) |
Definition at line 585 of file Symbol.cpp.
References lldb_private::Disassembler::DisassembleRange(), lldb_private::AddressRange::GetBaseAddress(), lldb_private::Address::GetModule(), lldb_private::ExecutionContext::GetTargetRef(), lldb_private::ExecutionContext::HasTargetScope(), and m_addr_range.
Referenced by GetDisassembly().
|
inline |
Definition at line 116 of file Symbol.h.
References lldb_private::AddressRange::GetBaseAddress(), lldb_private::Address::GetOffset(), m_addr_range, and ValueIsAddress().
Referenced by SymbolFileDWARFDebugMap::InitOSO().
|
inline |
Definition at line 137 of file Symbol.h.
References GetMangled().
Referenced by lldb_private::FormatEntity::Format(), and lldb_private::SymbolContext::GetLanguage().
lldb::addr_t Symbol::GetLoadAddress | ( | Target * | target | ) | const |
Definition at line 537 of file Symbol.cpp.
References GetAddressRef(), lldb_private::Address::GetLoadAddress(), LLDB_INVALID_ADDRESS, and ValueIsAddress().
Referenced by lldb_private::Process::CreateBreakpointSite(), ProcessFreeBSDKernel::FindSymbol(), lldb_private::AppleObjCRuntimeV2::GetByteOffsetForIvar(), lldb_private::AppleObjCRuntimeV2::GetCFBooleanValuesIfNeeded(), lldb_private::AppleObjCRuntimeV2::GetISAHashTablePointer(), lldb_private::AppleObjCRuntimeV2::GetTaggedPointerObfuscator(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::InitializeVTableSymbols(), DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(), SystemRuntimeMacOSX::ReadLibdispatchOffsetsAddress(), SystemRuntimeMacOSX::ReadLibdispatchTSDIndexesAddress(), and SystemRuntimeMacOSX::ReadLibpthreadOffsetsAddress().
|
inline |
Definition at line 145 of file Symbol.h.
References m_mangled, and SynthesizeNameIfNeeded().
Referenced by ObjectFilePECOFF::AppendFromCOFFSymbolTable(), ObjectFilePECOFF::AppendFromExportTable(), lldb_private::Symtab::AppendSymbolNamesToMap(), Compare(), lldb_private::SymbolContext::Dump(), Dump(), lldb_private::SymbolContext::FindBestGlobalDataSymbol(), lldb_private::DynamicLoaderDarwin::FindEquivalentSymbols(), lldb_private::FormatEntity::Format(), GetDescription(), lldb::SBSymbol::GetDisplayName(), GetDisplayName(), SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(), lldb_private::SymbolContext::GetFunctionName(), GetLanguage(), lldb_private::SymbolContext::GetLanguage(), lldb::SBSymbol::GetMangledName(), GetName(), GetNameNoArguments(), DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(), GetSymbolDeclarationFromAddress(), lldb_private::ItaniumABILanguageRuntime::GetTypeInfoFromVTableAddress(), lldb_private::StackFrame::GuessLanguage(), lldb_private::Symtab::InitNameIndexes(), SymbolFileSymtab::ParseFunctions(), ObjectFileCOFF::ParseSymtab(), ObjectFileMachO::ParseSymtab(), lldb_private::SymbolContextSpecifier::SymbolContextMatches(), and SymbolContextsMightBeEquivalent().
|
inline |
Definition at line 150 of file Symbol.h.
References m_mangled, and SynthesizeNameIfNeeded().
ConstString Symbol::GetName | ( | ) | const |
Definition at line 544 of file Symbol.cpp.
References GetMangled().
Referenced by ApplyELF32ABS32RelRelocation(), lldb_private::Address::Dump(), lldb_private::SymbolContext::Dump(), lldb_private::SymbolContext::DumpStopContext(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), findSymbolAddress(), lldb_private::FormatEntity::Format(), lldb_private::Debugger::FormatDisassemblerAddress(), lldb_private::BreakpointLocation::GetDescription(), lldb_private::CPlusPlusLanguage::GetFunctionDisplayName(), lldb::SBFrame::GetFunctionName(), lldb::SBSymbol::GetName(), lldb_private::SymbolFileOnDemand::GetParameterStackSize(), GetReExportedSymbolName(), lldb_private::AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), lldb_private::CPPLanguageRuntime::GetStepThroughTrampolinePlan(), GetSymbolNameFromAddress(), GetSymbolOrFunctionName(), SymbolFileDWARFDebugMap::InitOSO(), lldb_private::RegisterContextUnwind::IsTrapHandlerSymbol(), lldb_private::formatters::LibcxxFunctionSummaryProvider(), SymbolFileSymtab::ParseCompileUnitAtIndex(), DynamicLoaderMacOS::ProcessDidExec(), DynamicLoaderMacOSXDYLD::ProcessDidExec(), and lldb_private::Process::ResolveIndirectFunction().
ConstString Symbol::GetNameNoArguments | ( | ) | const |
Definition at line 546 of file Symbol.cpp.
References GetMangled().
Referenced by lldb_private::FormatEntity::Format().
uint32_t Symbol::GetPrologueByteSize | ( | ) |
Definition at line 309 of file Symbol.cpp.
References lldb_private::Address::CalculateSymbolContextFunction(), lldb::eSymbolTypeCode, lldb::eSymbolTypeResolver, lldb_private::AddressRange::GetBaseAddress(), 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(), lldb::SBSymbol::GetPrologueByteSize(), 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 108 of file Symbol.h.
References lldb_private::AddressRange::GetBaseAddress(), lldb_private::Address::GetFileAddress(), and m_addr_range.
Referenced by lldb::SBSymbol::GetValue(), and LookupSymbolInModule().
ConstString Symbol::GetReExportedSymbolName | ( | ) | const |
Definition at line 175 of file Symbol.cpp.
References lldb::eSymbolTypeReExported, lldb_private::AddressRange::GetBaseAddress(), GetName(), lldb_private::Address::GetOffset(), m_addr_range, and m_type.
Referenced by Dump(), lldb_private::SymbolContext::FindBestGlobalDataSymbol(), and ResolveReExportedSymbol().
FileSpec Symbol::GetReExportedSymbolSharedLibrary | ( | ) | const |
Definition at line 189 of file Symbol.cpp.
References lldb::eSymbolTypeReExported, lldb_private::AddressRange::GetByteSize(), m_addr_range, and m_type.
Referenced by lldb_private::SymbolContext::FindBestGlobalDataSymbol(), and ResolveReExportedSymbol().
uint32_t Symbol::GetSiblingIndex | ( | ) | const |
Definition at line 219 of file Symbol.cpp.
References lldb_private::AddressRange::GetByteSize(), m_addr_range, m_size_is_sibling, and UINT32_MAX.
Referenced by lldb_private::Symtab::GetParent(), and SymbolFileDWARFDebugMap::InitOSO().
|
inline |
Definition at line 215 of file Symbol.h.
References m_size_is_sibling.
Referenced by SymbolFileSymtab::ParseFunctions().
|
inline |
Definition at line 186 of file Symbol.h.
References m_size_is_synthesized.
|
inlinestatic |
Definition at line 258 of file Symbol.h.
Referenced by lldb_private::Symtab::GetNameIndexes(), IsSyntheticWithAutoGeneratedName(), and SynthesizeNameIfNeeded().
|
inline |
Definition at line 167 of file Symbol.h.
References m_type.
Referenced by ObjectFilePECOFF::AppendFromCOFFSymbolTable(), lldb_private::SymbolContext::DumpStopContext(), lldb_private::SymbolContext::FindBestGlobalDataSymbol(), SymbolFileDWARFDebugMap::FindCompleteObjCDefinitionTypeForDIE(), lldb_private::Module::FindFunctions(), lldb_private::Symtab::FindFunctionSymbols(), lldb_private::Debugger::FormatDisassemblerAddress(), lldb_private::ObjectFile::GetAddressClass(), ObjectFileMachO::GetAddressClass(), SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), lldb::SBSymbol::GetType(), lldb_private::Symtab::InitNameIndexes(), SymbolFileDWARFDebugMap::InitOSO(), lldb_private::ClangExpressionDeclMap::LookupFunction(), ObjectFileMachO::ParseSymtab(), and ResolveCallableAddress().
const char * Symbol::GetTypeAsString | ( | ) | const |
Definition at line 395 of file Symbol.cpp.
References ENUM_TO_CSTRING, lldb_private::Exception, lldb_private::Invalid, and m_type.
Referenced by Dump().
|
inline |
Definition at line 190 of file Symbol.h.
References m_is_debug.
Referenced by SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(), and lldb_private::Symtab::FileRangeToIndexMapCompare::rank().
|
inline |
Definition at line 194 of file Symbol.h.
References m_is_external.
Referenced by lldb_private::SymbolContext::FindBestGlobalDataSymbol(), lldb::SBSymbol::IsExternal(), lldb_private::ClangExpressionDeclMap::LookupFunction(), and lldb_private::Symtab::FileRangeToIndexMapCompare::rank().
bool Symbol::IsIndirect | ( | ) | const |
Definition at line 225 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 180 of file Symbol.h.
References m_is_synthetic.
Referenced by lldb::SBSymbol::IsSynthetic(), IsSyntheticWithAutoGeneratedName(), and lldb_private::Module::ResolveSymbolContextForAddress().
bool Symbol::IsSyntheticWithAutoGeneratedName | ( | ) | const |
Definition at line 616 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 223 of file Symbol.cpp.
References lldb::eSymbolTypeTrampoline, and m_type.
Referenced by DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(), and lldb_private::Symtab::InitNameIndexes().
|
inline |
Definition at line 202 of file Symbol.h.
References m_is_weak.
Referenced by lldb_private::Symtab::FileRangeToIndexMapCompare::rank().
Definition at line 76 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, and m_uid.
bool Symbol::operator== | ( | const Symbol & | rhs | ) | const |
Definition at line 733 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, and m_uid.
lldb::addr_t Symbol::ResolveCallableAddress | ( | Target & | target | ) | const |
Definition at line 550 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, and ResolveReExportedSymbol().
Definition at line 516 of file Symbol.cpp.
References lldb_private::ModuleSpec::GetFileSpec(), GetReExportedSymbolName(), GetReExportedSymbolSharedLibrary(), and ResolveReExportedSymbolInModuleSpec().
Referenced by lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), lldb_private::ClangExpressionDeclMap::LookupFunction(), ResolveCallableAddress(), and lldb_private::BreakpointResolverName::SearchCallback().
|
protected |
Definition at line 466 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(), and ResolveReExportedSymbolInModuleSpec().
Referenced by ResolveReExportedSymbol(), and ResolveReExportedSymbolInModuleSpec().
|
inline |
Definition at line 210 of file Symbol.h.
References m_addr_range, m_size_is_valid, and lldb_private::AddressRange::SetByteSize().
Referenced by lldb_private::Symtab::InitAddressIndexes(), and ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 232 of file Symbol.h.
References m_contains_linker_annotations.
|
inline |
Definition at line 192 of file Symbol.h.
References m_is_debug.
Referenced by ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 227 of file Symbol.h.
References m_demangled_is_synthesized.
Referenced by ObjectFilePECOFF::AppendFromExportTable(), and ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 196 of file Symbol.h.
References m_is_external.
Referenced by ObjectFilePECOFF::AppendFromCOFFSymbolTable(), ObjectFilePECOFF::AppendFromExportTable(), and ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 175 of file Symbol.h.
References m_flags.
Referenced by ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 143 of file Symbol.h.
References m_uid.
Referenced by ObjectFilePECOFF::AppendFromExportTable(), and ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 184 of file Symbol.h.
References m_is_synthetic.
Referenced by ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 204 of file Symbol.h.
References m_is_weak.
Referenced by ObjectFileELF::ParseSymbols(), and ObjectFileMachO::ParseSymtab().
void Symbol::SetReExportedSymbolName | ( | ConstString | name | ) |
Definition at line 201 of file Symbol.cpp.
References lldb::eSymbolTypeReExported, lldb_private::AddressRange::GetBaseAddress(), lldb_private::ConstString::GetCString(), m_addr_range, lldb_private::Address::SetOffset(), and SetType().
Referenced by ObjectFileMachO::ParseSymtab().
bool Symbol::SetReExportedSymbolSharedLibrary | ( | const FileSpec & | fspec | ) |
Definition at line 208 of file Symbol.cpp.
References lldb::eSymbolTypeReExported, lldb_private::ConstString::GetCString(), lldb_private::FileSpec::GetPath(), m_addr_range, m_type, and lldb_private::AddressRange::SetByteSize().
Referenced by ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 217 of file Symbol.h.
References m_size_is_sibling.
Referenced by ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 188 of file Symbol.h.
References m_size_is_synthesized.
Referenced by lldb_private::Symtab::InitAddressIndexes().
|
inline |
Definition at line 169 of file Symbol.h.
References m_type.
Referenced by ObjectFilePECOFF::AppendFromCOFFSymbolTable(), ObjectFilePECOFF::AppendFromExportTable(), ObjectFileCOFF::ParseSymtab(), ObjectFileMachO::ParseSymtab(), and SetReExportedSymbolName().
|
protected |
Definition at line 625 of file Symbol.cpp.
References GetID(), GetSyntheticSymbolPrefix(), m_is_synthetic, and m_mangled.
Referenced by GetMangled().
bool Symbol::ValueIsAddress | ( | ) | const |
Definition at line 167 of file Symbol.cpp.
References lldb_private::AddressRange::GetBaseAddress(), lldb_private::Address::GetSection(), and m_addr_range.
Referenced by lldb_private::InstrumentationRuntimeASan::Activate(), 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(), lldb_private::SymbolContext::DumpStopContext(), DumpSymbolContext(), ExtractRuntimeGlobalSymbol(), lldb_private::Module::FindFunctions(), GetAddress(), lldb_private::ObjectFile::GetAddressClass(), ObjectFileMachO::GetAddressClass(), lldb_private::SymbolContext::GetAddressRange(), lldb_private::CommandObjectDisassemble::GetCurrentFunctionRanges(), GetDescription(), DynamicLoaderMacOS::GetDyldLockVariableAddressFromModule(), lldb::SBSymbol::GetEndAddress(), GetFileAddress(), SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(), lldb_private::SymbolContext::GetFunctionName(), lldb::SBSymbol::GetInstructions(), GetIntegerValue(), lldb_private::AppleObjCRuntimeV1::GetISAHashTablePointer(), GetLoadAddress(), lldb::SBSymbol::GetStartAddress(), lldb_private::ThreadPlanStepRange::InSymbol(), LookupSymbolInModule(), and SymbolFileDWARF::ParseVariableDIE().
|
protected |
Definition at line 340 of file Symbol.h.
Referenced by Clear(), ContainsFileAddress(), Decode(), Dump(), Encode(), GetAddress(), GetAddressRef(), GetByteSize(), GetDescription(), GetInstructions(), GetIntegerValue(), GetPrologueByteSize(), GetRawValue(), GetReExportedSymbolName(), GetReExportedSymbolSharedLibrary(), GetSiblingIndex(), operator=(), operator==(), SetByteSize(), SetReExportedSymbolName(), SetReExportedSymbolSharedLibrary(), and ValueIsAddress().
|
protected |
Definition at line 334 of file Symbol.h.
Referenced by Clear(), ContainsLinkerAnnotations(), Decode(), Encode(), operator=(), operator==(), and SetContainsLinkerAnnotations().
|
protected |
Definition at line 331 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetDemangledNameIsSynthesized(), operator=(), operator==(), and SetDemangledNameIsSynthesized().
|
protected |
Definition at line 343 of file Symbol.h.
Referenced by Clear(), Decode(), Dump(), Encode(), GetFlags(), operator=(), operator==(), and SetFlags().
|
protected |
Definition at line 322 of file Symbol.h.
Referenced by Clear(), Decode(), Dump(), Encode(), IsDebug(), operator=(), operator==(), and SetDebug().
|
protected |
Definition at line 324 of file Symbol.h.
Referenced by Clear(), Decode(), Dump(), Encode(), IsExternal(), operator=(), operator==(), and SetExternal().
|
protected |
Definition at line 319 of file Symbol.h.
Referenced by Clear(), Decode(), Dump(), Encode(), IsSynthetic(), operator=(), operator==(), SetIsSynthetic(), and SynthesizeNameIfNeeded().
|
protected |
Definition at line 337 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), IsWeak(), operator=(), operator==(), and SetIsWeak().
|
mutableprotected |
Definition at line 339 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetDescription(), GetMangled(), IsSyntheticWithAutoGeneratedName(), operator=(), operator==(), and SynthesizeNameIfNeeded().
|
protected |
Definition at line 325 of file Symbol.h.
Referenced by Clear(), Decode(), Dump(), Encode(), GetDescription(), GetSiblingIndex(), GetSizeIsSibling(), operator=(), operator==(), and SetSizeIsSibling().
|
protected |
Definition at line 327 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetSizeIsSynthesized(), operator=(), operator==(), and SetSizeIsSynthesized().
|
protected |
Definition at line 330 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetByteSizeIsValid(), operator=(), operator==(), and SetByteSize().
|
protected |
Definition at line 338 of file Symbol.h.
Referenced by Clear(), Compare(), Decode(), Dump(), Encode(), GetPrologueByteSize(), GetReExportedSymbolName(), GetReExportedSymbolSharedLibrary(), GetType(), GetTypeAsString(), IsIndirect(), IsTrampoline(), operator=(), operator==(), SetReExportedSymbolSharedLibrary(), and SetType().
|
protected |
Definition at line 316 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetPrologueByteSize(), operator=(), and operator==().
|
protected |
Definition at line 317 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetPrologueByteSize(), operator=(), and operator==().
|
protected |
Definition at line 314 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetDescription(), GetID(), operator=(), operator==(), and SetID().