LLDB mainline
|
A section + offset based address class. More...
#include "lldb/Core/Address.h"
Classes | |
class | ModulePointerAndOffsetLessThanFunctionObject |
Public Types | |
enum | DumpStyle { DumpStyleInvalid , DumpStyleSectionNameOffset , DumpStyleSectionPointerOffset , DumpStyleFileAddress , DumpStyleModuleWithFileAddress , DumpStyleLoadAddress , DumpStyleResolvedDescription , DumpStyleResolvedDescriptionNoModule , DumpStyleResolvedDescriptionNoFunctionArguments , DumpStyleNoFunctionName , DumpStyleDetailedSymbolContext , DumpStyleResolvedPointerDescription } |
Dump styles allow the Address::Dump(Stream *,DumpStyle) const function to display Address contents in a variety of ways. More... | |
Public Member Functions | |
Address ()=default | |
Default constructor. | |
Address (const Address &rhs) | |
Copy constructor. | |
Address (const lldb::SectionSP §ion_sp, lldb::addr_t offset) | |
Construct with a section pointer and offset. | |
Address (lldb::addr_t file_addr, const SectionList *section_list) | |
Construct with a virtual address and section list. | |
Address (lldb::addr_t abs_addr) | |
const Address & | operator= (const Address &rhs) |
Assignment operator. | |
void | Clear () |
Clear the object's state. | |
bool | GetDescription (Stream &s, Target &target, lldb::DescriptionLevel level) const |
Write a description of this object to a Stream. | |
bool | Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, DumpStyle fallback_style=DumpStyleInvalid, uint32_t addr_byte_size=UINT32_MAX, bool all_ranges=false, std::optional< Stream::HighlightSettings > settings=std::nullopt) const |
Dump a description of this object to a Stream. | |
AddressClass | GetAddressClass () const |
lldb::addr_t | GetFileAddress () const |
Get the file address. | |
lldb::addr_t | GetLoadAddress (Target *target) const |
Get the load address. | |
lldb::addr_t | GetCallableLoadAddress (Target *target, bool is_indirect=false) const |
Get the load address as a callable code load address. | |
lldb::addr_t | GetOpcodeLoadAddress (Target *target, AddressClass addr_class=AddressClass::eInvalid) const |
Get the load address as an opcode load address. | |
lldb::addr_t | GetOffset () const |
Get the section relative offset value. | |
bool | IsSectionOffset () const |
Check if an address is section offset. | |
bool | IsValid () const |
Check if the object state is valid. | |
size_t | MemorySize () const |
Get the memory cost of this object. | |
bool | ResolveAddressUsingFileSections (lldb::addr_t addr, const SectionList *sections) |
Resolve a file virtual address using a section list. | |
bool | ResolveFunctionScope (lldb_private::SymbolContext &sym_ctx, lldb_private::AddressRange *addr_range_ptr=nullptr) |
Resolve this address to its containing function and optionally get that function's address range. | |
bool | SetLoadAddress (lldb::addr_t load_addr, Target *target, bool allow_section_end=false) |
Set the address to represent load_addr. | |
bool | SetOpcodeLoadAddress (lldb::addr_t load_addr, Target *target, AddressClass addr_class=AddressClass::eInvalid, bool allow_section_end=false) |
bool | SetCallableLoadAddress (lldb::addr_t load_addr, Target *target) |
lldb::ModuleSP | GetModule () const |
Get accessor for the module for this address. | |
lldb::SectionSP | GetSection () const |
Get const accessor for the section. | |
bool | SetOffset (lldb::addr_t offset) |
Set accessor for the offset. | |
void | SetRawAddress (lldb::addr_t addr) |
bool | Slide (int64_t offset) |
void | SetSection (const lldb::SectionSP §ion_sp) |
Set accessor for the section. | |
void | ClearSection () |
uint32_t | CalculateSymbolContext (SymbolContext *sc, lldb::SymbolContextItem resolve_scope=lldb::eSymbolContextEverything) const |
Reconstruct a symbol context from an address. | |
lldb::ModuleSP | CalculateSymbolContextModule () const |
CompileUnit * | CalculateSymbolContextCompileUnit () const |
Function * | CalculateSymbolContextFunction () const |
Block * | CalculateSymbolContextBlock () const |
Symbol * | CalculateSymbolContextSymbol () const |
bool | CalculateSymbolContextLineEntry (LineEntry &line_entry) const |
bool | SectionWasDeleted () const |
Static Public Member Functions | |
static int | CompareFileAddress (const Address &lhs, const Address &rhs) |
Compare two Address objects. | |
static int | CompareLoadAddress (const Address &lhs, const Address &rhs, Target *target) |
static int | CompareModulePointerAndOffset (const Address &lhs, const Address &rhs) |
Protected Member Functions | |
bool | SectionWasDeletedPrivate () const |
Protected Attributes | |
lldb::SectionWP | m_section_wp |
The section for the address, can be NULL. | |
lldb::addr_t | m_offset = LLDB_INVALID_ADDRESS |
Offset into section if m_section_wp is valid... | |
A section + offset based address class.
The Address class allows addresses to be relative to a section that can move during runtime due to images (executables, shared libraries, bundles, frameworks) being loaded at different addresses than the addresses found in the object file that represents them on disk. There are currently two types of addresses for a section:
File addresses represent the virtual addresses that are in the "on disk" object files. These virtual addresses are converted to be relative to unique sections scoped to the object file so that when/if the addresses slide when the images are loaded/unloaded in memory, we can easily track these changes without having to update every object (compile unit ranges, line tables, function address ranges, lexical block and inlined subroutine address ranges, global and static variables) each time an image is loaded or unloaded.
Load addresses represent the virtual addresses where each section ends up getting loaded at runtime. Before executing a program, it is common for all of the load addresses to be unresolved. When a DynamicLoader plug-in receives notification that shared libraries have been loaded/unloaded, the load addresses of the main executable and any images (shared libraries) will be resolved/unresolved. When this happens, breakpoints that are in one of these sections can be set/cleared.
Dump styles allow the Address::Dump(Stream *,DumpStyle) const function to display Address contents in a variety of ways.
|
default |
Default constructor.
Initialize with a invalid section (NULL) and an invalid offset (LLDB_INVALID_ADDRESS).
Referenced by MemorySize().
|
inline |
|
inline |
Construct with a section pointer and offset.
Initialize the address with the supplied section and offset.
[in] | section_sp | A section pointer to a valid lldb::Section, or NULL if the address doesn't have a section or will get resolved later. |
[in] | offset | The offset in bytes into section. |
Definition at line 143 of file Address.h.
References m_section_wp.
Address::Address | ( | lldb::addr_t | file_addr, |
const SectionList * | section_list | ||
) |
Construct with a virtual address and section list.
Initialize and resolve the address with the supplied virtual address file_addr.
[in] | file_addr | A virtual file address. |
[in] | section_list | A list of sections, one of which may contain the file_addr. |
Definition at line 237 of file Address.cpp.
References ResolveAddressUsingFileSections().
Address::Address | ( | lldb::addr_t | abs_addr | ) |
Definition at line 235 of file Address.cpp.
uint32_t Address::CalculateSymbolContext | ( | SymbolContext * | sc, |
lldb::SymbolContextItem | resolve_scope = lldb::eSymbolContextEverything |
||
) | const |
Reconstruct a symbol context from an address.
This class doesn't inherit from SymbolContextScope because many address objects have short lifespans. Address objects that are section offset can reconstruct their symbol context by looking up the address in the module found in the section.
Definition at line 832 of file Address.cpp.
References lldb_private::SymbolContext::Clear(), GetSection(), and lldb_private::SymbolContext::module_sp.
Referenced by lldb_private::SearchFilterByModuleListAndCU::AddressPasses(), CalculateSymbolContext(), lldb_private::BreakpointLocation::GetDescription(), lldb_private::LineEntry::GetSameLineContiguousAddressRange(), lldb_private::ScriptedThread::LoadArtificialStackFrames(), lldb::SBThreadPlan::QueueThreadPlanForStepInRange(), lldb::SBThreadPlan::QueueThreadPlanForStepOverRange(), ResolveFunctionScope(), lldb_private::CompileUnit::ResolveSymbolContext(), lldb_private::ThreadPlanStepOverRange::ShouldStop(), and lldb_private::ThreadPlanStepOut::ThreadPlanStepOut().
Block * Address::CalculateSymbolContextBlock | ( | ) | const |
Definition at line 886 of file Address.cpp.
References lldb_private::SymbolContext::block, GetSection(), and lldb_private::SymbolContext::module_sp.
CompileUnit * Address::CalculateSymbolContextCompileUnit | ( | ) | const |
Definition at line 858 of file Address.cpp.
References lldb_private::SymbolContext::comp_unit, GetSection(), and lldb_private::SymbolContext::module_sp.
Referenced by lldb_private::BreakpointLocation::ConditionSaysStop(), and lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo().
Function * Address::CalculateSymbolContextFunction | ( | ) | const |
Definition at line 872 of file Address.cpp.
References lldb_private::SymbolContext::function, GetSection(), and lldb_private::SymbolContext::module_sp.
Referenced by CommandObjectSourceList::DoExecute(), CommandObjectSourceInfo::DumpLinesInFunctions(), ExtractDestroyFunction(), lldb_private::Module::FindAddressesForLine(), lldb_private::IndirectCallEdge::GetCallee(), lldb_private::Symbol::GetPrologueByteSize(), lldb_private::DirectCallEdge::ParseSymbolFileAndResolve(), lldb_private::ThreadPlanStepOverRange::ShouldStop(), and ValueObjectVTableChild::UpdateValue().
bool Address::CalculateSymbolContextLineEntry | ( | LineEntry & | line_entry | ) | const |
Definition at line 914 of file Address.cpp.
References lldb_private::LineEntry::Clear(), GetSection(), lldb_private::LineEntry::IsValid(), lldb_private::SymbolContext::line_entry, and lldb_private::SymbolContext::module_sp.
Referenced by GetDescription(), lldb_private::SymbolContext::GetFunctionStartLineEntry(), and line_entry_helper().
ModuleSP Address::CalculateSymbolContextModule | ( | ) | const |
Definition at line 851 of file Address.cpp.
References GetSection().
Symbol * Address::CalculateSymbolContextSymbol | ( | ) | const |
Definition at line 900 of file Address.cpp.
References GetSection(), lldb_private::SymbolContext::module_sp, and lldb_private::SymbolContext::symbol.
Referenced by lldb_private::Process::CreateBreakpointSite(), lldb_private::BreakpointLocation::GetDescription(), lldb_private::AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(), GetSymbolDeclarationFromAddress(), GetSymbolNameFromAddress(), lldb_private::ItaniumABILanguageRuntime::GetVTableInfo(), and lldb_private::Process::ResolveIndirectFunction().
|
inline |
Clear the object's state.
Sets the section to an invalid value (NULL) and an invalid offset (LLDB_INVALID_ADDRESS).
Definition at line 181 of file Address.h.
References LLDB_INVALID_ADDRESS, m_offset, and m_section_wp.
Referenced by lldb_private::AddressRange::Clear(), lldb_private::UnwindPlan::Clear(), DynamicLoaderDarwinKernel::Clear(), DynamicLoaderFreeBSDKernel::Clear(), lldb_private::Symbol::Decode(), lldb_private::CompactUnwindInfo::GetCompactUnwindInfoForFunction(), ObjectFileMachO::GetEntryPointAddress(), lldb_private::SymbolContext::GetParentOfInlinedScope(), DynamicLoaderMacOS::ProcessDidExec(), DynamicLoaderMacOSXDYLD::ProcessDidExec(), DynamicLoaderDarwinKernel::ReadKextSummaryHeader(), DynamicLoaderFreeBSDKernel::ReadKmodsListHeader(), lldb_private::plugin::dwarf::SymbolFileDWARF::ResolveFunction(), lldb_private::SectionLoadList::ResolveLoadAddress(), and lldb_private::BreakpointResolverName::SearchCallback().
|
inline |
Definition at line 477 of file Address.h.
References m_section_wp.
Compare two Address objects.
[in] | lhs | The Left Hand Side const Address object reference. |
[in] | rhs | The Right Hand Side const Address object reference. |
Definition at line 932 of file Address.cpp.
References GetFileAddress().
Referenced by lldb_private::LineEntry::Compare().
|
static |
Definition at line 942 of file Address.cpp.
References GetLoadAddress().
Referenced by lldb_private::UserExpression::LockAndCheckContext().
Definition at line 954 of file Address.cpp.
References GetFileAddress(), and GetModule().
Referenced by lldb_private::Address::ModulePointerAndOffsetLessThanFunctionObject::operator()().
bool Address::Dump | ( | Stream * | s, |
ExecutionContextScope * | exe_scope, | ||
DumpStyle | style, | ||
DumpStyle | fallback_style = DumpStyleInvalid , |
||
uint32_t | addr_byte_size = UINT32_MAX , |
||
bool | all_ranges = false , |
||
std::optional< Stream::HighlightSettings > | settings = std::nullopt |
||
) | const |
Dump a description of this object to a Stream.
Dump a description of the contents of this object to the supplied stream s. There are many ways to display a section offset based address, and style lets the user choose.
[in] | s | The stream to which to dump the object description. |
[in] | style | The display style for the address. |
[in] | fallback_style | The display style for the address. |
[in] | addr_byte_size | The address byte size for the address. |
[in] | all_ranges | If true, dump all valid ranges and value ranges for the variable that contains the address, otherwise dumping the range that contains the address. |
[in] | pattern | An optional regex pattern to match against the description. If specified, parts of the description matching this pattern may be highlighted or processed differently. If this parameter is an empty string or not provided, no highlighting is applied. |
Definition at line 408 of file Address.cpp.
References lldb_private::Block::AppendVariables(), lldb_private::ConstString::AsCString(), lldb_private::Stream::AsRawOstream(), lldb_private::SymbolContext::block, Dump(), lldb_private::DumpAddress(), lldb_private::DumpAddressRange(), lldb_private::SymbolContext::DumpStopContext(), DumpStyleDetailedSymbolContext, DumpStyleFileAddress, DumpStyleInvalid, DumpStyleLoadAddress, DumpStyleModuleWithFileAddress, DumpStyleNoFunctionName, DumpStyleResolvedDescription, DumpStyleResolvedDescriptionNoFunctionArguments, DumpStyleResolvedDescriptionNoModule, DumpStyleResolvedPointerDescription, DumpStyleSectionNameOffset, DumpStyleSectionPointerOffset, DumpUInt(), lldb::eDescriptionLevelBrief, lldb_private::Stream::EOL(), lldb::eSectionTypeData, lldb::eSectionTypeData16, lldb::eSectionTypeData4, lldb::eSectionTypeData8, lldb::eSectionTypeDataCString, lldb::eSectionTypeDataCStringPointers, lldb::eSectionTypeDataObjCCFStrings, lldb::eSectionTypeDataObjCMessageRefs, lldb::eSectionTypeDataPointers, lldb_private::ABI::FindPlugin(), lldb_private::SymbolContext::function, lldb_private::ArchSpec::GetAddressByteSize(), lldb_private::Symbol::GetAddressRef(), lldb_private::Target::GetArchitecture(), GetCallableLoadAddress(), lldb_private::ConstString::GetCString(), lldb_private::SymbolContext::GetDescription(), GetFileAddress(), lldb_private::Target::GetImages(), GetLoadAddress(), lldb_private::ArchSpec::GetMachine(), GetModule(), lldb_private::Type::GetName(), lldb_private::Symbol::GetName(), GetOffset(), lldb_private::ExecutionContext::GetProcessPtr(), GetSection(), lldb_private::StreamString::GetSize(), lldb_private::StreamString::GetString(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::Stream::Indent(), IsSectionOffset(), LLDB_INVALID_ADDRESS, lldb_private::Variable::LocationIsValidForAddress(), m_offset, lldb_private::Stream::Printf(), lldb_private::Stream::PutChar(), lldb_private::Stream::PutCString(), lldb_private::Stream::PutCStringColorHighlighted(), ReadAddress(), ReadCStringFromMemory(), lldb_private::Process::ReadPointerFromMemory(), lldb_private::ModuleList::ResolveSymbolContextForAddress(), SetLoadAddress(), SetOffset(), lldb_private::SymbolContext::symbol, UINT32_MAX, lldb_private::Symbol::ValueIsAddress(), and lldb_private::Stream::Write().
Referenced by lldb::SBBreakpoint::AddLocation(), lldb_private::ClangExpressionDeclMap::AddOneFunction(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), CommandObjectSourceList::DoExecute(), Dump(), lldb_private::AddressRange::Dump(), lldb_private::LineEntry::Dump(), lldb_private::Symbol::Dump(), DumpAddress(), DumpAddressAndContent(), lldb_private::DumpDataExtractor(), CommandObjectRegisterRead::DumpRegister(), lldb_private::SymbolContext::DumpStopContext(), lldb_private::BreakpointResolverAddress::GetDescription(), lldb_private::BreakpointLocation::GetDescription(), lldb_private::ThreadPlanStepOut::GetDescription(), lldb_private::LineEntry::GetDescription(), lldb_private::Symbol::GetDescription(), CommandObjectSourceInfo::GetSymbolContextsForAddress(), lldb_private::CompactUnwindInfo::GetUnwindPlan(), lldb_private::ThreadPlanAssemblyTracer::Log(), lldb_private::UnwindPlan::PlanValidAtAddress(), CommandObjectTargetModulesList::PrintModule(), and DisassemblerLLVMC::SymbolLookup().
AddressClass Address::GetAddressClass | ( | ) | const |
Definition at line 1033 of file Address.cpp.
References lldb_private::eUnknown, lldb_private::ObjectFile::GetAddressClass(), GetFileAddress(), GetModule(), and lldb_private::ObjectFile::GetSymtab().
Referenced by DisassemblerLLVMC::DecodeInstructions(), lldb_private::Instruction::GetAddressClass(), GetCallableLoadAddress(), GetOpcodeLoadAddress(), SetCallableLoadAddress(), EmulateInstructionMIPS::SetInstruction(), lldb_private::EmulateInstructionARM::SetInstruction(), and SetOpcodeLoadAddress().
Get the load address as a callable code load address.
This function will first resolve its address to a load address. Then, if the address turns out to be in code address, return the load address that would be required to call or return to. The address might have extra bits set (bit zero will be set to Thumb functions for an ARM target) that are required when changing the program counter to setting a return address.
Definition at line 338 of file Address.cpp.
References error(), GetAddressClass(), lldb_private::Target::GetCallableLoadAddress(), GetLoadAddress(), lldb_private::Target::GetProcessSP(), and LLDB_INVALID_ADDRESS.
Referenced by lldb_private::ClangExpressionDeclMap::AddOneFunction(), CommandObjectThreadJump::DoExecute(), Dump(), lldb_private::ClangExpressionDeclMap::GetSymbolAddress(), line_entry_helper(), ABIMacOSX_arm::PrepareTrivialCall(), ABISysV_arm::PrepareTrivialCall(), lldb_private::Symbol::ResolveCallableAddress(), lldb_private::RegisterContext::SetPC(), and lldb_private::FunctionCaller::WriteFunctionArguments().
bool Address::GetDescription | ( | Stream & | s, |
Target & | target, | ||
lldb::DescriptionLevel | level | ||
) | const |
Write a description of this object to a Stream.
Definition at line 395 of file Address.cpp.
References CalculateSymbolContextLineEntry(), lldb_private::LineEntry::column, lldb::eDescriptionLevelBrief, lldb_private::ConstString::GetCString(), lldb_private::LineEntry::GetFile(), lldb_private::FileSpec::GetFilename(), lldb_private::LineEntry::line, and lldb_private::Stream::Printf().
Referenced by DescribeAddressBriefly().
addr_t Address::GetFileAddress | ( | ) | const |
Get the file address.
If an address comes from a file on disk that has section relative addresses, then it has a virtual address that is relative to unique section in the object file.
Definition at line 293 of file Address.cpp.
References GetSection(), LLDB_INVALID_ADDRESS, m_offset, and SectionWasDeletedPrivate().
Referenced by lldb_private::BreakpointResolver::AddLocation(), lldb_private::ClangExpressionDeclMap::AddOneFunction(), lldb_private::Block::AddRange(), ObjectFilePECOFF::AppendFromCOFFSymbolTable(), ApplyELF32ABS32RelRelocation(), ApplyELF64ABS32Relocation(), ApplyELF64ABS64Relocation(), ObjectFileELF::ApplyRelocations(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CalculateFrameVariableError(), InstructionLLVMC::CalculateMnemonicOperandsAndComment(), CompareFileAddress(), CompareModulePointerAndOffset(), DynamicLoaderPOSIXDYLD::ComputeLoadOffset(), lldb_private::AddressRange::ContainsFileAddress(), lldb_private::npdb::SymbolFileNativePDB::CreateBlock(), lldb_private::npdb::SymbolFileNativePDB::CreateLocalVariable(), InstructionLLVMC::Decode(), CommandObjectThreadStepWithTypeAndScope::DoExecute(), ObjectFileELF::Dump(), lldb_private::Function::Dump(), Dump(), lldb_private::AddressRange::Dump(), DumpAddressAndContent(), DumpAddressOffsetFromFunction(), CommandObjectSourceInfo::DumpLinesInFunctions(), lldb_private::Variable::DumpLocations(), lldb_private::Symbol::Encode(), lldb_private::AddressRange::Extend(), lldb_private::DWARFCallFrameInfo::FDEToUnwindPlan(), lldb_private::Module::FindFunctions(), DynamicLoaderFreeBSDKernel::FindKernelAtLoadAddress(), lldb_private::LineTable::FindLineEntryByAddress(), fixupExternalAddrZeroVariable(), GetAddressClass(), lldb_private::DWARFCallFrameInfo::GetAddressRange(), lldb_private::SymbolContext::GetAddressRangeFromHereToEndLine(), lldb_private::ArchitectureMips::GetBreakableLoadAddress(), lldb_private::ArchitecturePPC64::GetBytesToSkip(), lldb_private::CompactUnwindInfo::GetCompactUnwindInfoForFunction(), SymbolFilePDB::GetCompileUnitContainsAddress(), lldb::SBBlock::GetDescription(), lldb_private::Block::GetDescription(), lldb_private::AddressRange::GetDescription(), DynamicLoaderHexagonDYLD::GetEntryPoint(), ObjectFileMachO::GetEntryPointAddress(), lldb_private::ArmUnwindInfo::GetExceptionHandlingTableEntry(), lldb_private::Symbol::GetFileAddress(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(), lldb_private::DWARFCallFrameInfo::GetFirstFDEEntryInRange(), lldb_private::UnwindTable::GetFuncUnwindersContainingAddress(), UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly(), lldb_private::breakpad::SymbolFileBreakpad::GetParameterStackSize(), lldb_private::SymbolContext::GetParentOfInlinedScope(), lldb_private::Function::GetPrologueByteSize(), lldb_private::Symbol::GetRawValue(), ObjectFilePECOFF::GetRVA(), ObjectFileELF::GetSegmentData(), lldb_private::breakpad::SymbolFileBreakpad::GetUnwindPlan(), lldb_private::CompactUnwindInfo::GetUnwindPlan(), lldb_private::StackFrame::GuessValueForRegisterAndOffset(), lldb_private::RegisterContextUnwind::InitializeZerothFrame(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::InitOSO(), lldb_private::Variable::IsInScope(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::LinkOSOAddress(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded(), lldb_private::Variable::LocationIsValidForAddress(), lldb_private::DWARFExpressionList::MatchesOperand(), EntitySymbol::Materialize(), lldb_private::operator<(), lldb_private::operator>(), lldb_private::npdb::SymbolFileNativePDB::ParseInlineSite(), ObjectFileMachO::ParseSymtab(), SymbolFilePDB::ParseVariableForPDBData(), CommandObjectTargetModulesList::PrintModule(), DynamicLoaderDarwinKernel::PutToLog(), DynamicLoaderDarwinKernel::ReadKextSummaryHeader(), DynamicLoaderFreeBSDKernel::ReadKmodsListHeader(), lldb_private::Target::ReadMemory(), LoadAddressResolver::Resolve(), lldb_private::SymbolFileCTF::ResolveSymbolContext(), lldb_private::SymbolFileJSON::ResolveSymbolContext(), SymbolFileSymtab::ResolveSymbolContext(), lldb_private::CompileUnit::ResolveSymbolContext(), lldb_private::Module::ResolveSymbolContextForAddress(), lldb_private::AddressResolverFileLine::SearchCallback(), DynamicLoaderDarwinKernel::SearchForKernelAtSameLoadAddr(), lldb_private::EmulateInstruction::SetInstruction(), ObjectFileELF::SetLoadAddress(), lldb_private::BreakpointResolver::SetSCMatchesByLine(), lldb_private::ValueObjectMemory::ValueObjectMemory(), and InstructionLLVMC::VisitInstruction().
Get the load address.
If an address comes from a file on disk that has section relative addresses, then it has a virtual address that is relative to unique section in the object file. Sections get resolved at runtime by DynamicLoader plug-ins as images (executables and shared libraries) get loaded/unloaded. If a section is loaded, then the load address can be resolved.
Definition at line 313 of file Address.cpp.
References GetSection(), LLDB_INVALID_ADDRESS, m_offset, and SectionWasDeletedPrivate().
Referenced by lldb_private::ClangExpressionDeclMap::AddOneGenericVariable(), SystemRuntimeMacOSX::BacktraceRecordingHeadersInitialized(), BuildModulesSection(), InstructionLLVMC::CalculateMnemonicOperandsAndComment(), CompareLoadAddress(), lldb_private::ThreadPlanCallFunction::ConstructorSetup(), lldb_private::AddressRange::ContainsLoadAddress(), lldb_private::Value::ConvertToLoadAddress(), CreateAllImageInfosPayload(), lldb_private::CompactUnwindInfo::CreateUnwindPlan_i386(), lldb_private::CompactUnwindInfo::CreateUnwindPlan_x86_64(), DescribeAddressBriefly(), lldb_private::StopInfoMachException::DeterminePtrauthFailure(), DynamicLoaderPOSIXDYLD::DidAttach(), lldb_private::HistoryUnwind::DoCreateRegisterContextForFrame(), CommandObjectTargetModulesLoad::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), CommandObjectThreadUntil::DoExecute(), lldb_private::UnwindPlan::Dump(), Dump(), lldb_private::AddressRange::Dump(), DumpAddressAndContent(), DumpAddressOffsetFromFunction(), CommandObjectSourceInfo::DumpLinesInFunctions(), ExtractRuntimeGlobalSymbol(), lldb_private::Process::FindInMemory(), HexagonDYLDRendezvous::FindMetadata(), lldb_private::Process::FindRangesInMemory(), findSymbolAddress(), lldb_private::ArchitectureMips::GetBreakableLoadAddress(), GetCallableLoadAddress(), lldb_private::Block::GetDescription(), lldb_private::ThreadPlanCallFunction::GetDescription(), lldb_private::ThreadPlanCallFunctionUsingABI::GetDescription(), lldb_private::AddressRange::GetDescription(), lldb_private::ItaniumABILanguageRuntime::GetDynamicTypeAndAddress(), lldb_private::StackFrame::GetFrameBaseValue(), lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), ProcessElfCore::GetImageInfoAddress(), lldb_private::ProcessWindows::GetImageInfoAddress(), ObjectFileELF::GetImageInfoAddress(), lldb_private::AppleObjCRuntimeV1::GetISAHashTablePointer(), lldb_private::ValueObject::GetLoadAddress(), lldb_private::CallEdge::GetLoadAddress(), lldb_private::Symbol::GetLoadAddress(), GetOpcodeLoadAddress(), lldb_private::Target::GetReasonableReadSize(), lldb_private::RegisterContextUnwind::GetStartPC(), DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(), JITLoaderGDB::GetSymbolAddress(), lldb_private::ClangExpressionDeclMap::GetSymbolAddress(), lldb_private::DynamicLoaderDarwin::GetThreadLocalData(), lldb_private::Value::GetValueAsData(), lldb_private::ClangExpressionDeclMap::GetVariableValue(), lldb_private::RegisterContextUnwind::InitializeNonZerothFrame(), lldb_private::RegisterContextUnwind::InitializeZerothFrame(), lldb_private::ThreadPlanStepRange::InRange(), DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded(), lldb_private::Variable::LocationIsValidForFrame(), EntitySymbol::Materialize(), CommandObjectTargetModulesList::PrintModule(), lldb_private::RegisterContextUnwind::PropagateTrapHandlerFlagFromUnwindPlan(), DynamicLoaderFreeBSDKernel::ReadAllKmods(), lldb_private::Target::ReadCStringFromMemory(), DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(), DynamicLoaderFreeBSDKernel::ReadKmodsListHeader(), lldb_private::Target::ReadMemory(), LoadAddressResolver::Resolve(), lldb_private::Process::ResolveIndirectFunction(), ResolveLoadAddress(), DYLDRendezvous::ResolveRendezvousAddress(), lldb_private::InstrumentationRuntimeMainThreadChecker::RetrieveReportData(), lldb_private::InstrumentationRuntimeUBSan::RetrieveReportData(), lldb_private::RegisterContextUnwind::SavedLocationForRegister(), lldb_private::BreakpointResolverAddress::SearchCallback(), lldb_private::EmulateInstruction::SetInstruction(), lldb_private::ThreadPlanStepRange::SetNextBranchBreakpoint(), lldb_private::Watchpoint::SetupVariableWatchpointDisabler(), lldb_private::ThreadPlanStepInRange::ShouldStop(), lldb_private::ThreadPlanStepOverRange::ShouldStop(), lldb_private::ThreadPlanStepOut::ThreadPlanStepOut(), lldb_private::CFBasicHash::UpdateFor(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), and lldb_private::ValueObjectMemory::ValueObjectMemory().
ModuleSP Address::GetModule | ( | ) | const |
Get accessor for the module for this address.
Definition at line 285 of file Address.cpp.
References GetSection().
Referenced by lldb_private::DynamicLoaderDarwin::AlwaysRelyOnEHUnwindInfo(), DynamicLoaderPOSIXDYLD::AlwaysRelyOnEHUnwindInfo(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CalculateFrameVariableError(), lldb_private::Symbol::CalculateSymbolContext(), lldb_private::Symbol::CalculateSymbolContextModule(), CompareModulePointerAndOffset(), CommandObjectSourceList::DoExecute(), CommandObjectTargetModulesList::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), Dump(), lldb_private::LineTable::FindLineEntryByAddress(), GetAddressClass(), lldb_private::DWARFCallFrameInfo::GetAddressRange(), lldb_private::ArchitectureMips::GetBreakableLoadAddress(), GetByteOrderAndAddressSize(), lldb::SBInstruction::GetDescription(), lldb::SBInstructionList::GetDescription(), lldb_private::RegisterContextUnwind::GetFastUnwindPlanForFrame(), lldb_private::InstrumentationRuntimeTSan::GetFirstNonInternalFramePc(), lldb_private::StackFrame::GetFrameCodeAddress(), lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), lldb_private::Symbol::GetInstructions(), lldb::SBFunction::GetInstructions(), lldb::SBSymbol::GetInstructions(), lldb_private::CallEdge::GetLoadAddress(), lldb_private::ValueObjectMemory::GetModule(), lldb_private::Symbol::GetPrologueByteSize(), CommandObjectSourceInfo::GetSymbolContextsForAddress(), lldb_private::DWARFCallFrameInfo::GetUnwindPlan(), lldb_private::RegisterContextUnwind::InitializeNonZerothFrame(), lldb_private::RegisterContextUnwind::InitializeZerothFrame(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::LinkOSOAddress(), lldb_private::Variable::LocationIsValidForAddress(), LookupAddressInModule(), lldb_private::DynamicLoaderWindowsDYLD::OnUnloadModule(), lldb_private::operator<(), lldb_private::operator>(), lldb::SBInstruction::Print(), lldb_private::Disassembler::PrintInstructions(), ReadAddress(), lldb_private::Target::ReadMemory(), lldb_private::BreakpointLocationList::RemoveInvalidLocations(), lldb_private::ModuleList::ResolveSymbolContextForAddress(), lldb_private::InstrumentationRuntimeMainThreadChecker::RetrieveReportData(), lldb_private::InstrumentationRuntimeUBSan::RetrieveReportData(), lldb_private::StackFrame::StackFrame(), DisassemblerLLVMC::SymbolLookup(), and lldb_private::DynamicLoaderDarwin::UnloadImages().
|
inline |
Get the section relative offset value.
Definition at line 329 of file Address.h.
References m_offset.
Referenced by lldb_private::ArchitecturePPC64::AdjustBreakpointAddress(), lldb_private::AddressRange::ContainsFileAddress(), lldb_private::AddressRange::ContainsLoadAddress(), CommandObjectThreadUntil::DoExecute(), Dump(), lldb_private::AddressRange::Dump(), lldb_private::Symbol::Dump(), lldb_private::AddressRange::DumpDebug(), lldb_private::SymbolContext::DumpStopContext(), lldb_private::BreakpointLocationList::FindByAddress(), DYLDRendezvous::FindMetadata(), lldb_private::Symbol::GetDescription(), lldb_private::Function::GetEndLineSourceInfo(), lldb_private::StackFrame::GetFrameCodeAddress(), lldb_private::StackFrame::GetFrameCodeAddressForSymbolication(), lldb_private::Symbol::GetIntegerValue(), lldb_private::Block::GetRangeContainingAddress(), lldb_private::Block::GetRangeIndexContainingAddress(), lldb_private::Symbol::GetReExportedSymbolName(), lldb_private::RegisterContextUnwind::InitializeNonZerothFrame(), lldb_private::RegisterContextUnwind::InitializeZerothFrame(), lldb_private::RegisterContextUnwind::IsUnwindPlanValidForCurrentPC(), lldb_private::operator!=(), lldb_private::operator==(), lldb_private::breakpad::SymbolFileBreakpad::ParseBlocksRecursive(), SymbolFileSymtab::ParseFunctions(), ReadCStringFromMemory(), ObjectFilePECOFF::ReadImageDataByRVA(), lldb_private::Target::ReadMemory(), lldb_private::Target::ReadMemoryFromFileCache(), ResolveAddress(), lldb_private::Module::ResolveSymbolContextForAddress(), lldb_private::BreakpointResolverAddress::SearchCallback(), lldb_private::BreakpointResolverName::SearchCallback(), lldb_private::BreakpointResolverAddress::SerializeToStructuredData(), lldb_private::ThreadPlanStepOut::ThreadPlanStepOut(), lldb_private::DynamicLoaderDarwin::UnloadImages(), and lldb_private::ValueObjectMemory::ValueObjectMemory().
addr_t Address::GetOpcodeLoadAddress | ( | Target * | target, |
AddressClass | addr_class = AddressClass::eInvalid |
||
) | const |
Get the load address as an opcode load address.
This function will first resolve its address to a load address. Then, if the address turns out to be in code address, return the load address for an opcode. This address object might have extra bits set (bit zero will be set to Thumb functions for an ARM target) that are required for changing the program counter and this function will remove any bits that are intended for these special purposes. The result of this function can be used to safely write a software breakpoint trap to memory.
Definition at line 370 of file Address.cpp.
References lldb_private::eInvalid, GetAddressClass(), GetLoadAddress(), lldb_private::Target::GetOpcodeLoadAddress(), and LLDB_INVALID_ADDRESS.
Referenced by lldb_private::InstrumentationRuntimeMainThreadChecker::Activate(), lldb_private::InstrumentationRuntimeTSan::Activate(), lldb_private::InstrumentationRuntimeUBSan::Activate(), lldb_private::AppleObjCTrampolineHandler::AppleObjCTrampolineHandler(), lldb_private::Process::CreateBreakpointSite(), lldb_private::BreakpointLocation::Dump(), DynamicLoaderMacOS::GetDyldLockVariableAddressFromModule(), lldb_private::StackFrame::GetFrameCodeAddressForSymbolication(), lldb_private::BreakpointLocation::GetLoadAddress(), lldb::SBFrame::GetPC(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::InitializeVTableSymbols(), lldb_private::BreakpointLocation::ResolveBreakpointSite(), lldb_private::ReportRetriever::SetupBreakpoint(), and lldb_private::ThreadPlanRunToAddress::ThreadPlanRunToAddress().
|
inline |
Get const accessor for the section.
Definition at line 439 of file Address.h.
References m_section_wp.
Referenced by ObjectFilePECOFF::AppendFromExportTable(), CalculateSymbolContext(), CalculateSymbolContextBlock(), CalculateSymbolContextCompileUnit(), CalculateSymbolContextFunction(), CalculateSymbolContextLineEntry(), CalculateSymbolContextModule(), lldb_private::Function::CalculateSymbolContextModule(), CalculateSymbolContextSymbol(), lldb_private::AddressRange::Contains(), lldb_private::AddressRange::ContainsFileAddress(), lldb_private::AddressRange::ContainsLoadAddress(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), CommandObjectThreadUntil::DoExecute(), Dump(), DumpAddressOffsetFromFunction(), lldb_private::AddressRange::DumpDebug(), CommandObjectMemoryRegion::DumpRegion(), lldb_private::Symbol::Encode(), lldb_private::ObjectFile::GetAddressClass(), ObjectFileMachO::GetAddressClass(), lldb_private::Symbol::GetDescription(), lldb_private::AddressRange::GetDescription(), ObjectFileELF::GetDynstrData(), GetFileAddress(), GetLoadAddress(), GetModule(), getModuleFileSize(), lldb_private::Block::GetRangeContainingAddress(), lldb_private::Block::GetRangeIndexContainingAddress(), lldb_private::RegisterContextUnwind::InitializeNonZerothFrame(), lldb_private::RegisterContextUnwind::InitializeZerothFrame(), IsSectionOffset(), lldb_private::Breakpoint::ModulesChanged(), lldb_private::operator!=(), lldb_private::operator==(), ObjectFileMachO::ParseSymtab(), ObjectFilePECOFF::ReadImageDataByRVA(), lldb_private::Target::ReadMemory(), lldb_private::Target::ReadMemoryFromFileCache(), RemoveFunctionsWithModuleNotEqualTo(), lldb_private::BreakpointResolverAddress::ResolveBreakpoint(), lldb_private::BreakpointResolverAddress::ResolveBreakpointInModules(), lldb_private::Module::ResolveSymbolContextForAddress(), SectionWasDeleted(), lldb_private::BreakpointResolverAddress::SerializeToStructuredData(), DisassemblerLLVMC::SymbolLookup(), and lldb_private::Symbol::ValueIsAddress().
|
inline |
Check if an address is section offset.
When converting a virtual file or load address into a section offset based address, we often need to know if, given a section list, if the address was able to be converted to section offset. This function returns true if the current value contained in this object is section offset based.
Definition at line 342 of file Address.h.
References GetSection(), and IsValid().
Referenced by Dump(), lldb_private::DWARFExpression::Evaluate(), lldb_private::BreakpointLocationList::FindByAddress(), lldb_private::BreakpointLocation::GetDescription(), lldb_private::StackFrame::GetFrameCodeAddress(), lldb_private::ItaniumABILanguageRuntime::GetTypeInfo(), lldb_private::Value::GetValueAsData(), lldb_private::Variable::LocationIsValidForAddress(), SymbolFileSymtab::ParseFunctions(), lldb_private::Target::ReadMemory(), ResolveAddress(), ResolveLoadAddress(), lldb_private::Module::ResolveSymbolContextForAddress(), and lldb_private::BreakpointResolverAddress::SearchCallback().
|
inline |
Check if the object state is valid.
A valid Address object contains either a section pointer and offset (for section offset based addresses), or just a valid offset (for absolute addresses that have no section).
Definition at line 355 of file Address.h.
References LLDB_INVALID_ADDRESS, and m_offset.
Referenced by lldb_private::InstrumentationRuntimeMainThreadChecker::Activate(), lldb_private::InstrumentationRuntimeTSan::Activate(), lldb_private::InstrumentationRuntimeUBSan::Activate(), lldb_private::BreakpointResolver::AddLocation(), lldb_private::Process::AdvanceAddressToNextBranchInstruction(), UnwindAssembly_x86::AugmentUnwindPlanFromCallSite(), lldb_private::x86AssemblyInspectionEngine::AugmentUnwindPlanFromCallSite(), BuildModulesSection(), CharStringSummaryProvider(), DynamicLoaderPOSIXDYLD::ComputeLoadOffset(), CreateAllImageInfosPayload(), lldb_private::Target::CreateBreakpoint(), lldb_private::npdb::SymbolFileNativePDB::CreateFunction(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), lldb_private::Disassembler::Disassemble(), lldb_private::Disassembler::DisassembleRange(), CommandObjectTargetModulesLoad::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), CommandObjectThreadStepWithTypeAndScope::DoExecute(), ObjectFileELF::Dump(), lldb_private::UnwindPlan::Dump(), DumpAddressOffsetFromFunction(), lldb_private::SymbolContext::DumpStopContext(), lldb_private::DWARFCallFrameInfo::FDEToUnwindPlan(), lldb_private::SymbolContext::FindBestGlobalDataSymbol(), lldb_private::BreakpointLocationList::FindByAddress(), DynamicLoaderFreeBSDKernel::FindKernelAtLoadAddress(), UnwindAssembly_x86::FirstNonPrologueInsn(), lldb_private::FormatEntity::Format(), lldb_private::UnwindTable::GetAddressRange(), lldb_private::FuncUnwinders::GetArmUnwindUnwindPlan(), lldb_private::FuncUnwinders::GetCompactUnwindUnwindPlan(), lldb_private::FuncUnwinders::GetDebugFrameUnwindPlan(), DynamicLoaderMacOS::GetDyldLockVariableAddressFromModule(), lldb_private::FuncUnwinders::GetEHFrameUnwindPlan(), lldb_private::Target::GetEntryPointAddress(), ObjectFileELF::GetEntryPointAddress(), ObjectFileMachO::GetEntryPointAddress(), ObjectFilePECOFF::GetEntryPointAddress(), lldb_private::RegisterContextUnwind::GetFastUnwindPlanForFrame(), lldb_private::FuncUnwinders::GetFirstNonPrologueInsn(), lldb_private::StackFrame::GetFrameCodeAddressForSymbolication(), lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), ProcessElfCore::GetImageInfoAddress(), lldb_private::ProcessWindows::GetImageInfoAddress(), UnwindAssembly_x86::GetNonCallSiteUnwindPlanFromAssembly(), UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly(), lldb_private::FuncUnwinders::GetObjectFileUnwindPlan(), lldb_private::DynamicLoaderDarwin::GetPthreadSetSpecificAddress(), lldb_private::RegisterContextUnwind::GetStartPC(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), JITLoaderGDB::GetSymbolAddress(), lldb_private::ClangExpressionDeclMap::GetSymbolAddress(), lldb_private::DynamicLoaderDarwin::GetThreadLocalData(), lldb_private::Value::GetValueAsData(), lldb_private::RegisterContextUnwind::InitializeNonZerothFrame(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::InitializeVTableSymbols(), lldb_private::RegisterContextUnwind::InitializeZerothFrame(), IsSectionOffset(), lldb_private::AddressRange::IsValid(), lldb_private::LineEntry::IsValid(), DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded(), lldb_private::UserExpression::LockAndCheckContext(), SymbolFilePDB::ParseCompileUnitFunctionForPDBFunc(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseFunction(), DWARFASTParserClang::ParseFunctionFromDWARF(), lldb_private::Disassembler::ParseInstructions(), lldb_private::DirectCallEdge::ParseSymbolFileAndResolve(), lldb_private::UnwindPlan::PlanValidAtAddress(), CommandObjectTargetModulesList::PrintModule(), DynamicLoaderDarwinKernel::ReadAllKextSummaries(), DynamicLoaderFreeBSDKernel::ReadAllKmods(), DynamicLoaderDarwinKernel::ReadKextSummaryHeader(), DynamicLoaderFreeBSDKernel::ReadKmodsListHeader(), lldb_private::Target::ReadMemory(), lldb_private::Target::ReadPointerFromMemory(), ResolveAddress(), lldb_private::Symbol::ResolveCallableAddress(), DYLDRendezvous::ResolveRendezvousAddress(), lldb_private::BreakpointResolverName::SearchCallback(), lldb_private::AddressResolverFileLine::SearchCallback(), DynamicLoaderDarwinKernel::SearchForKernelAtSameLoadAddr(), lldb_private::EmulateInstruction::SetInstruction(), lldb_private::ThreadPlanStepRange::SetNextBranchBreakpoint(), lldb_private::UnwindPlan::SetPlanValidAddressRange(), lldb_private::ReportRetriever::SetupBreakpoint(), DisassemblerLLVMC::SymbolLookup(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), ValueObjectVTableChild::UpdateValue(), and lldb_private::formatters::WCharStringSummaryProvider().
size_t Address::MemorySize | ( | ) | const |
Get the memory cost of this object.
Definition at line 974 of file Address.cpp.
References Address().
Assignment operator.
Copies the address value from another Address object rhs into this object.
[in] | rhs | A const Address object reference to copy. |
Definition at line 242 of file Address.cpp.
References m_offset, and m_section_wp.
bool Address::ResolveAddressUsingFileSections | ( | lldb::addr_t | addr, |
const SectionList * | sections | ||
) |
Resolve a file virtual address using a section list.
Given a list of sections, attempt to resolve addr as an offset into one of the file sections.
Definition at line 250 of file Address.cpp.
References lldb_private::SectionList::FindSectionContainingFileAddress(), m_offset, and m_section_wp.
Referenced by Address(), lldb_private::Symbol::Decode(), lldb_private::CompactUnwindInfo::GetCompactUnwindInfoForFunction(), ObjectFileELF::GetDynstrData(), ObjectFileELF::GetEntryPointAddress(), ObjectFileMachO::GetEntryPointAddress(), ObjectFilePECOFF::GetEntryPointAddress(), ObjectFileELF::GetImageInfoAddress(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseFunction(), and lldb_private::Module::ResolveFileAddress().
bool Address::ResolveFunctionScope | ( | lldb_private::SymbolContext & | sym_ctx, |
lldb_private::AddressRange * | addr_range_ptr = nullptr |
||
) |
Resolve this address to its containing function and optionally get that function's address range.
if "addr_range_ptr" is not NULL, then fill in with the address range of the function.
[out] | sym_ctx | The symbol context describing the function in which this address lies |
\parm[out] addr_range_ptr Pointer to the AddressRange to fill in with the function's address range. Caller may pass null if they don't need the address range.
Definition at line 268 of file Address.cpp.
References CalculateSymbolContext(), lldb_private::AddressRange::Clear(), and lldb_private::SymbolContext::GetAddressRange().
Referenced by lldb_private::RegisterContextUnwind::InitializeNonZerothFrame(), lldb_private::RegisterContextUnwind::InitializeZerothFrame(), and lldb_private::RegisterContextUnwind::PropagateTrapHandlerFlagFromUnwindPlan().
bool Address::SectionWasDeleted | ( | ) | const |
Definition at line 812 of file Address.cpp.
References GetSection(), and SectionWasDeletedPrivate().
Referenced by lldb_private::Breakpoint::ModulesChanged(), and lldb_private::BreakpointLocationList::RemoveInvalidLocations().
|
protected |
Definition at line 818 of file Address.cpp.
References m_section_wp.
Referenced by GetFileAddress(), GetLoadAddress(), and SectionWasDeleted().
bool Address::SetCallableLoadAddress | ( | lldb::addr_t | load_addr, |
Target * | target | ||
) |
Definition at line 361 of file Address.cpp.
References GetAddressClass(), lldb_private::Target::GetCallableLoadAddress(), m_offset, and SetLoadAddress().
bool Address::SetLoadAddress | ( | lldb::addr_t | load_addr, |
Target * | target, | ||
bool | allow_section_end = false |
||
) |
Set the address to represent load_addr.
The address will attempt to find a loaded section within target that contains load_addr. If successful, this address object will have a valid section and offset. Else this address object will have no section (NULL) and the offset will be load_addr.
[in] | load_addr | A load address from a current process. |
[in] | target | The target to use when trying resolve the address into a section + offset. The Target's SectionLoadList object is used to resolve the address. |
[in] | allow_section_end | If true, treat an address pointing to the end of the module as belonging to that module. |
Definition at line 1047 of file Address.cpp.
References lldb_private::Target::GetSectionLoadList(), m_offset, m_section_wp, and lldb_private::SectionLoadList::ResolveLoadAddress().
Referenced by CalculateSymbolInfo(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), CommandObjectTargetModulesList::DoExecute(), Dump(), lldb::SBValue::GetAddress(), lldb_private::BreakpointLocation::GetDescription(), lldb_private::ThreadPlanStepOut::GetDescription(), lldb_private::InstructionList::GetIndexOfInstructionAtLoadAddress(), lldb_private::RegisterContext::GetPCForSymbolication(), lldb_private::Block::GetRangeContainingLoadAddress(), lldb_private::RegisterContextUnwind::InitializeNonZerothFrame(), lldb_private::RegisterContextUnwind::InitializeZerothFrame(), lldb_private::ScriptedThread::LoadArtificialStackFrames(), ABIMacOSX_arm::PrepareTrivialCall(), ABISysV_arm::PrepareTrivialCall(), lldb_private::Target::ReadMemory(), lldb_private::StackFrameList::ResetCurrentInlinedDepth(), SetCallableLoadAddress(), SetOpcodeLoadAddress(), and lldb_private::DynamicLoaderDarwin::UnloadImages().
|
inline |
Set accessor for the offset.
[in] | offset | A new offset value for this object. |
Definition at line 448 of file Address.h.
References m_offset.
Referenced by lldb_private::ArchitecturePPC64::AdjustBreakpointAddress(), lldb_private::Target::CreateBreakpoint(), lldb_private::Symbol::Decode(), Dump(), lldb_private::DumpDataExtractor(), DYLDRendezvous::FindMetadata(), ObjectFileMachO::GetBaseAddress(), lldb_private::Function::GetEndLineSourceInfo(), ObjectFileELF::GetEntryPointAddress(), ObjectFilePECOFF::GetEntryPointAddress(), lldb_private::StackFrame::GetFrameCodeAddressForSymbolication(), ObjectFileELF::GetImageInfoAddress(), lldb_private::Block::GetRangeContainingAddress(), lldb_private::RegisterContextUnwind::IsUnwindPlanValidForCurrentPC(), lldb_private::UtilityFunction::MakeFunctionCaller(), ObjectFileELF::ParseSymtab(), ObjectFileMachO::ParseSymtab(), ReadCStringFromMemory(), lldb_private::Target::ReadPointerFromMemory(), lldb_private::Section::ResolveContainedAddress(), lldb_private::BreakpointResolverName::SearchCallback(), lldb::SBAddress::SetAddress(), and lldb_private::Symbol::SetReExportedSymbolName().
bool Address::SetOpcodeLoadAddress | ( | lldb::addr_t | load_addr, |
Target * | target, | ||
AddressClass | addr_class = AddressClass::eInvalid , |
||
bool | allow_section_end = false |
||
) |
Definition at line 381 of file Address.cpp.
References lldb_private::eInvalid, GetAddressClass(), lldb_private::Target::GetOpcodeLoadAddress(), m_offset, and SetLoadAddress().
Referenced by lldb_private::StackFrame::GetFrameCodeAddress(), lldb_private::StackFrame::GetFrameCodeAddressForSymbolication(), and lldb_private::AppleThreadPlanStepThroughObjCTrampoline::ShouldStop().
|
inline |
Definition at line 454 of file Address.h.
References m_offset, and m_section_wp.
Referenced by lldb_private::StackFrame::ChangePC(), DumpInstructions(), lldb::SBBreakpoint::FindLocationByAddress(), lldb::SBBreakpoint::FindLocationIDByAddress(), lldb_private::ItaniumABILanguageRuntime::GetDynamicTypeAndAddress(), lldb_private::AppleObjCRuntimeV1::GetDynamicTypeAndAddress(), lldb_private::AppleObjCRuntimeV2::GetDynamicTypeAndAddress(), ReadAddress(), lldb::SBTarget::ResolveFileAddress(), lldb::SBTarget::ResolveLoadAddress(), lldb::SBTarget::ResolvePastLoadAddress(), and DynamicLoaderMacOS::SetNotificationBreakpoint().
|
inline |
Set accessor for the section.
[in] | section_sp | A new lldb::Section pointer to use as the section base. Can be NULL for absolute addresses that are not relative to any section. |
Definition at line 473 of file Address.h.
References m_section_wp.
Referenced by ObjectFileMachO::GetBaseAddress(), ObjectFileMachO::ParseSymtab(), lldb_private::Section::ResolveContainedAddress(), and lldb::SBAddress::SetAddress().
|
inline |
Definition at line 459 of file Address.h.
References LLDB_INVALID_ADDRESS, and m_offset.
Referenced by lldb_private::BreakpointResolver::AddLocation(), lldb_private::LineTable::ConvertEntryAtIndexToLineEntry(), lldb_private::CompactUnwindInfo::CreateUnwindPlan_i386(), lldb_private::CompactUnwindInfo::CreateUnwindPlan_x86_64(), DisassemblerLLVMC::DecodeInstructions(), lldb_private::ThreadPlanShouldStopHere::DefaultStepFromHereCallback(), UnwindAssembly_x86::FirstNonPrologueInsn(), lldb_private::FormatEntity::Format(), lldb::SBFunction::GetEndAddress(), lldb::SBSymbol::GetEndAddress(), lldb_private::ArchitectureMips::GetInstructionAtAddress(), lldb_private::Symbol::GetPrologueByteSize(), lldb_private::Block::GetRangeAtIndex(), lldb::SBBlock::GetRangeEndAddress(), lldb_private::Block::GetRanges(), lldb_private::LineEntry::GetSameLineContiguousAddressRange(), lldb_private::Block::GetStartAddress(), DynamicLoaderDarwinKernel::ReadAllKextSummaries(), lldb_private::Target::ReadStringFromMemory(), lldb_private::Module::ResolveSymbolContextForAddress(), lldb_private::ThreadPlanStepRange::SetNextBranchBreakpoint(), lldb_private::ThreadPlanStepInRange::ShouldStop(), and lldb_private::ThreadPlanStepOut::ThreadPlanStepOut().
|
protected |
Offset into section if m_section_wp is valid...
Definition at line 513 of file Address.h.
Referenced by Clear(), Dump(), GetFileAddress(), GetLoadAddress(), GetOffset(), IsValid(), operator=(), ResolveAddressUsingFileSections(), SetCallableLoadAddress(), SetLoadAddress(), SetOffset(), SetOpcodeLoadAddress(), SetRawAddress(), and Slide().
|
protected |
The section for the address, can be NULL.
Definition at line 512 of file Address.h.
Referenced by Address(), Clear(), ClearSection(), GetSection(), operator=(), ResolveAddressUsingFileSections(), SectionWasDeletedPrivate(), SetLoadAddress(), SetRawAddress(), and SetSection().