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. More... | |
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. More... | |
lldb::ModuleSP | CalculateSymbolContextModule () override |
Symbol * | CalculateSymbolContextSymbol () override |
void | DumpSymbolContext (Stream *s) override |
Dump the object's symbol context to the stream s. More... | |
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. More... | |
void | Encode (DataEncoder &encoder, ConstStringTable &strtab) const |
Encode this object into a data encoder object. More... | |
bool | operator== (const Symbol &rhs) const |
![]() | |
virtual | ~SymbolContextScope ()=default |
virtual CompileUnit * | CalculateSymbolContextCompileUnit () |
virtual Function * | CalculateSymbolContextFunction () |
virtual Block * | CalculateSymbolContextBlock () |
Static Public Member Functions | |
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 26 of file Symbol.cpp.
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 34 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 48 of file Symbol.cpp.
Symbol::Symbol | ( | const Symbol & | rhs | ) |
Definition at line 63 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 382 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 391 of file Symbol.cpp.
References GetAddressRef(), lldb_private::Address::GetModule(), and ValueIsAddress().
Referenced by GetSymbolDeclarationFromAddress().
|
overridevirtual |
Reimplemented from lldb_private::SymbolContextScope.
Definition at line 397 of file Symbol.cpp.
Referenced by lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan().
void Symbol::Clear | ( | ) |
Definition at line 98 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 332 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 568 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 215 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 599 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 212 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(), GetByteSize(), lldb_private::AddressRange::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 399 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 652 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.
|
inline |
Definition at line 73 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::ClangExpressionDeclMap::GetSymbolAddress(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::InitializeVTableSymbols(), DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded(), SymbolFileSymtab::ParseFunctions(), ResolveCallableAddress(), DYLDRendezvous::ResolveRendezvousAddress(), lldb_private::BreakpointResolverName::SearchCallback(), lldb_private::lldb_renderscript::RSBreakpointResolver::SearchCallback(), lldb_private::lldb_renderscript::RSScriptGroupBreakpointResolver::SearchCallback(), and lldb_private::ThreadPlanStepInRange::ShouldStop().
|
inline |
Definition at line 57 of file Symbol.h.
References lldb_private::AddressRange::GetBaseAddress(), and m_addr_range.
Referenced by lldb_private::InstrumentationRuntimeASan::Activate(), lldb_private::InstrumentationRuntimeTSan::Activate(), lldb_private::InstrumentationRuntimeMainThreadChecker::Activate(), lldb_private::InstrumentationRuntimeUBSan::Activate(), lldb_private::DynamicLoaderDarwin::AlwaysRelyOnEHUnwindInfo(), DynamicLoaderPOSIXDYLD::AlwaysRelyOnEHUnwindInfo(), ObjectFilePECOFF::AppendFromCOFFSymbolTable(), ObjectFilePECOFF::AppendFromExportTable(), lldb_private::SymbolContextList::AppendIfUnique(), lldb_private::AppleObjCTrampolineHandler::AppleObjCTrampolineHandler(), ObjectFileELF::ApplyRelocations(), CalculateSymbolContext(), CalculateSymbolContextModule(), lldb_private::Disassembler::Disassemble(), CommandObjectSourceList::DoExecute(), lldb_private::Address::Dump(), DumpAddressOffsetFromFunction(), CommandObjectSourceInfo::DumpLinesInFunctions(), lldb_private::SymbolContext::DumpStopContext(), DumpSymbolContext(), ExtractRuntimeGlobalSymbol(), lldb_private::Module::FindFunctions(), ObjectFileMachO::GetAddressClass(), lldb_private::ObjectFile::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(), lldb_private::lldb_renderscript::RSModuleDescriptor::ParseRSInfo(), ObjectFileMachO::ParseSymtab(), ObjectFileELF::ParseSymtab(), and SymbolFileDWARF::ParseVariableDIE().
|
inline |
Definition at line 59 of file Symbol.h.
References lldb_private::AddressRange::GetBaseAddress(), and m_addr_range.
lldb::addr_t Symbol::GetByteSize | ( | ) | const |
Definition at line 414 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(), SymbolFileSymtab::ParseFunctions(), and lldb_private::lldb_renderscript::RSModuleDescriptor::ParseRSInfo().
|
inline |
Definition at line 192 of file Symbol.h.
References m_size_is_valid.
Referenced by lldb::SBSymbol::GetSize(), LookupSymbolInModule(), and ObjectFileELF::ParseUnwindSymbols().
|
inline |
Definition at line 209 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 177 of file Symbol.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::AddressRange::Dump(), lldb_private::Address::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 553 of file Symbol.cpp.
References GetInstructions().
ConstString Symbol::GetDisplayName | ( | ) | const |
Definition at line 121 of file Symbol.cpp.
References GetMangled().
Referenced by ObjectFilePECOFF::AppendFromExportTable(), lldb::SBFrame::GetDisplayFunctionName(), and LookupSymbolInModule().
lldb::addr_t Symbol::GetFileAddress | ( | ) | const |
Definition at line 486 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 159 of file Symbol.h.
References m_flags.
Referenced by ObjectFileMachO::GetAddressClass(), and GetLocalEntryOffset().
|
inline |
Definition at line 121 of file Symbol.h.
References m_uid.
Referenced by SymbolFileDWARFDebugMap::CalculateFrameVariableError(), Dump(), lldb_private::StackID::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 541 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 102 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 123 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 493 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(), lldb_private::RenderScriptRuntime::LoadModule(), DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(), SystemRuntimeMacOSX::ReadLibdispatchOffsetsAddress(), SystemRuntimeMacOSX::ReadLibdispatchTSDIndexesAddress(), SystemRuntimeMacOSX::ReadLibpthreadOffsetsAddress(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ServeSymbolLookups().
|
inline |
Definition at line 131 of file Symbol.h.
References m_mangled, and SynthesizeNameIfNeeded().
Referenced by ObjectFilePECOFF::AppendFromCOFFSymbolTable(), ObjectFilePECOFF::AppendFromExportTable(), lldb_private::Symtab::AppendSymbolNamesToMap(), Compare(), Dump(), lldb_private::SymbolContext::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(), ObjectFileMachO::ParseSymtab(), lldb_private::SymbolContextSpecifier::SymbolContextMatches(), and SymbolContextsMightBeEquivalent().
|
inline |
Definition at line 136 of file Symbol.h.
References m_mangled, and SynthesizeNameIfNeeded().
ConstString Symbol::GetName | ( | ) | const |
Definition at line 500 of file Symbol.cpp.
References GetMangled().
Referenced by lldb_private::SymbolContext::Dump(), lldb_private::Address::Dump(), lldb_private::SymbolContext::DumpStopContext(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), findSymbolAddress(), lldb_private::FormatEntity::Format(), lldb_private::Debugger::FormatDisassemblerAddress(), lldb_private::BreakpointLocation::GetDescription(), 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(), lldb_private::Process::ResolveIndirectFunction(), lldb_private::RenderScriptRuntime::ResolveKernelName(), and lldb_private::lldb_renderscript::RSScriptGroupBreakpointResolver::SearchCallback().
ConstString Symbol::GetNameNoArguments | ( | ) | const |
Definition at line 502 of file Symbol.cpp.
References GetMangled().
Referenced by lldb_private::FormatEntity::Format().
uint32_t Symbol::GetPrologueByteSize | ( | ) |
Definition at line 259 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::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(), lldb_private::BreakpointResolverName::SearchCallback(), 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 94 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 125 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(), lldb_private::ClangExpressionDeclMap::GetSymbolAddress(), and ResolveReExportedSymbol().
FileSpec Symbol::GetReExportedSymbolSharedLibrary | ( | ) | const |
Definition at line 139 of file Symbol.cpp.
References lldb::eSymbolTypeReExported, lldb_private::AddressRange::GetByteSize(), m_addr_range, and m_type.
Referenced by lldb_private::SymbolContext::FindBestGlobalDataSymbol(), lldb_private::ClangExpressionDeclMap::GetSymbolAddress(), and ResolveReExportedSymbol().
uint32_t Symbol::GetSiblingIndex | ( | ) | const |
Definition at line 169 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 201 of file Symbol.h.
References m_size_is_sibling.
Referenced by SymbolFileSymtab::ParseFunctions().
|
inline |
Definition at line 172 of file Symbol.h.
References m_size_is_synthesized.
|
inlinestatic |
Definition at line 244 of file Symbol.h.
Referenced by lldb_private::Symtab::GetNameIndexes(), IsSyntheticWithAutoGeneratedName(), and SynthesizeNameIfNeeded().
|
inline |
Definition at line 153 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(), ObjectFileMachO::GetAddressClass(), lldb_private::ObjectFile::GetAddressClass(), SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), lldb_private::ClangExpressionDeclMap::GetSymbolAddress(), lldb::SBSymbol::GetType(), lldb_private::Symtab::InitNameIndexes(), SymbolFileDWARFDebugMap::InitOSO(), lldb_private::ClangExpressionDeclMap::LookupFunction(), ObjectFileMachO::ParseSymtab(), ResolveCallableAddress(), lldb_private::BreakpointResolverName::SearchCallback(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ServeSymbolLookups().
const char * Symbol::GetTypeAsString | ( | ) | const |
Definition at line 345 of file Symbol.cpp.
References ENUM_TO_CSTRING, lldb_private::Exception, lldb_private::Invalid, and m_type.
Referenced by Dump().
|
inline |
Definition at line 176 of file Symbol.h.
References m_is_debug.
Referenced by SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(), and lldb_private::Symtab::FileRangeToIndexMapCompare::rank().
|
inline |
Definition at line 180 of file Symbol.h.
References m_is_external.
Referenced by lldb_private::SymbolContext::FindBestGlobalDataSymbol(), lldb::SBSymbol::IsExternal(), lldb_private::ClangExpressionDeclMap::LookupFunction(), lldb_private::Symtab::FileRangeToIndexMapCompare::rank(), and ResolveReExportedSymbolInModuleSpec().
bool Symbol::IsIndirect | ( | ) | const |
Definition at line 175 of file Symbol.cpp.
References lldb::eSymbolTypeResolver, and m_type.
Referenced by lldb_private::ClangExpressionDeclMap::AddOneFunction(), lldb_private::BreakpointLocation::BreakpointLocation(), lldb_private::Process::CreateBreakpointSite(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), and ResolveCallableAddress().
|
inline |
Definition at line 166 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 572 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 173 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 188 of file Symbol.h.
References m_is_weak.
Referenced by lldb_private::Symtab::FileRangeToIndexMapCompare::rank().
Definition at line 75 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 689 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 506 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 472 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 416 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::SymbolContextList::GetContextAtIndex(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::Target::GetImages(), lldb_private::SymbolContextList::GetSize(), IsExternal(), and lldb_private::SymbolContext::symbol.
Referenced by ResolveReExportedSymbol().
|
inline |
Definition at line 196 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 218 of file Symbol.h.
References m_contains_linker_annotations.
|
inline |
Definition at line 178 of file Symbol.h.
References m_is_debug.
Referenced by ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 213 of file Symbol.h.
References m_demangled_is_synthesized.
Referenced by ObjectFilePECOFF::AppendFromExportTable(), and ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 182 of file Symbol.h.
References m_is_external.
Referenced by ObjectFilePECOFF::AppendFromCOFFSymbolTable(), ObjectFilePECOFF::AppendFromExportTable(), and ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 161 of file Symbol.h.
References m_flags.
Referenced by ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 129 of file Symbol.h.
References m_uid.
Referenced by ObjectFilePECOFF::AppendFromExportTable(), and ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 170 of file Symbol.h.
References m_is_synthetic.
Referenced by ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 190 of file Symbol.h.
References m_is_weak.
Referenced by ObjectFileELF::ParseSymbols(), and ObjectFileMachO::ParseSymtab().
void Symbol::SetReExportedSymbolName | ( | ConstString | name | ) |
Definition at line 151 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 158 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 203 of file Symbol.h.
References m_size_is_sibling.
Referenced by ObjectFileMachO::ParseSymtab().
|
inline |
Definition at line 174 of file Symbol.h.
References m_size_is_synthesized.
Referenced by lldb_private::Symtab::InitAddressIndexes().
|
inline |
Definition at line 155 of file Symbol.h.
References m_type.
Referenced by ObjectFilePECOFF::AppendFromCOFFSymbolTable(), ObjectFilePECOFF::AppendFromExportTable(), ObjectFileMachO::ParseSymtab(), and SetReExportedSymbolName().
|
protected |
Definition at line 581 of file Symbol.cpp.
References GetID(), GetSyntheticSymbolPrefix(), m_is_synthetic, and m_mangled.
Referenced by GetMangled().
bool Symbol::ValueIsAddress | ( | ) | const |
Definition at line 117 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::InstrumentationRuntimeTSan::Activate(), lldb_private::InstrumentationRuntimeMainThreadChecker::Activate(), lldb_private::InstrumentationRuntimeUBSan::Activate(), lldb_private::SymbolContextList::AppendIfUnique(), lldb_private::AppleObjCTrampolineHandler::AppleObjCTrampolineHandler(), CalculateSymbolContext(), CalculateSymbolContextModule(), lldb_private::ThreadPlanShouldStopHere::DefaultStepFromHereCallback(), lldb_private::Disassembler::Disassemble(), CommandObjectSourceList::DoExecute(), Dump(), lldb_private::Address::Dump(), DumpAddressOffsetFromFunction(), CommandObjectSourceInfo::DumpLinesInFunctions(), lldb_private::SymbolContext::DumpStopContext(), DumpSymbolContext(), ExtractRuntimeGlobalSymbol(), lldb_private::Module::FindFunctions(), GetAddress(), ObjectFileMachO::GetAddressClass(), lldb_private::ObjectFile::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 326 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 320 of file Symbol.h.
Referenced by Clear(), ContainsLinkerAnnotations(), Decode(), Encode(), operator=(), operator==(), and SetContainsLinkerAnnotations().
|
protected |
Definition at line 317 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetDemangledNameIsSynthesized(), operator=(), operator==(), and SetDemangledNameIsSynthesized().
|
protected |
Definition at line 329 of file Symbol.h.
Referenced by Clear(), Decode(), Dump(), Encode(), GetFlags(), operator=(), operator==(), and SetFlags().
|
protected |
Definition at line 308 of file Symbol.h.
Referenced by Clear(), Decode(), Dump(), Encode(), IsDebug(), operator=(), operator==(), and SetDebug().
|
protected |
Definition at line 310 of file Symbol.h.
Referenced by Clear(), Decode(), Dump(), Encode(), IsExternal(), operator=(), operator==(), and SetExternal().
|
protected |
Definition at line 305 of file Symbol.h.
Referenced by Clear(), Decode(), Dump(), Encode(), IsSynthetic(), operator=(), operator==(), SetIsSynthetic(), and SynthesizeNameIfNeeded().
|
protected |
Definition at line 323 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), IsWeak(), operator=(), operator==(), and SetIsWeak().
|
mutableprotected |
Definition at line 325 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetDescription(), GetMangled(), IsSyntheticWithAutoGeneratedName(), operator=(), operator==(), and SynthesizeNameIfNeeded().
|
protected |
Definition at line 311 of file Symbol.h.
Referenced by Clear(), Decode(), Dump(), Encode(), GetDescription(), GetSiblingIndex(), GetSizeIsSibling(), operator=(), operator==(), and SetSizeIsSibling().
|
protected |
Definition at line 313 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetSizeIsSynthesized(), operator=(), operator==(), and SetSizeIsSynthesized().
|
protected |
Definition at line 316 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetByteSizeIsValid(), operator=(), operator==(), and SetByteSize().
|
protected |
Definition at line 324 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 302 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetPrologueByteSize(), operator=(), and operator==().
|
protected |
Definition at line 303 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetPrologueByteSize(), operator=(), and operator==().
|
protected |
Definition at line 300 of file Symbol.h.
Referenced by Clear(), Decode(), Encode(), GetDescription(), GetID(), operator=(), operator==(), and SetID().