LLDB mainline
|
"lldb/Target/ExecutionContext.h" A class that contains an execution context. More...
#include <ExecutionContext.h>
Public Member Functions | |
ExecutionContext () | |
Default Constructor. | |
ExecutionContext (const ExecutionContext &rhs) | |
ExecutionContext (Target *t, bool fill_current_process_thread_frame=true) | |
ExecutionContext (const lldb::TargetSP &target_sp, bool get_process) | |
ExecutionContext (const lldb::ProcessSP &process_sp) | |
ExecutionContext (const lldb::ThreadSP &thread_sp) | |
ExecutionContext (const lldb::StackFrameSP &frame_sp) | |
ExecutionContext (const lldb::TargetWP &target_wp, bool get_process) | |
ExecutionContext (const lldb::ProcessWP &process_wp) | |
ExecutionContext (const lldb::ThreadWP &thread_wp) | |
ExecutionContext (const lldb::StackFrameWP &frame_wp) | |
ExecutionContext (const ExecutionContextRef &exe_ctx_ref) | |
ExecutionContext (const ExecutionContextRef *exe_ctx_ref, bool thread_and_frame_only_if_stopped=false) | |
ExecutionContext (ExecutionContextScope *exe_scope) | |
ExecutionContext (ExecutionContextScope &exe_scope) | |
ExecutionContext (Process *process, Thread *thread=nullptr, StackFrame *frame=nullptr) | |
Construct with process, thread, and frame index. | |
~ExecutionContext () | |
ExecutionContext & | operator= (const ExecutionContext &rhs) |
bool | operator== (const ExecutionContext &rhs) const |
bool | operator!= (const ExecutionContext &rhs) const |
void | Clear () |
Clear the object's state. | |
RegisterContext * | GetRegisterContext () const |
ExecutionContextScope * | GetBestExecutionContextScope () const |
uint32_t | GetAddressByteSize () const |
lldb::ByteOrder | GetByteOrder () const |
Target * | GetTargetPtr () const |
Returns a pointer to the target object. | |
Process * | GetProcessPtr () const |
Returns a pointer to the process object. | |
Thread * | GetThreadPtr () const |
Returns a pointer to the thread object. | |
StackFrame * | GetFramePtr () const |
Returns a pointer to the frame object. | |
Target & | GetTargetRef () const |
Returns a reference to the target object. | |
Process & | GetProcessRef () const |
Returns a reference to the process object. | |
Thread & | GetThreadRef () const |
Returns a reference to the thread object. | |
StackFrame & | GetFrameRef () const |
Returns a reference to the thread object. | |
const lldb::TargetSP & | GetTargetSP () const |
Get accessor to get the target shared pointer. | |
const lldb::ProcessSP & | GetProcessSP () const |
Get accessor to get the process shared pointer. | |
const lldb::ThreadSP & | GetThreadSP () const |
Get accessor to get the thread shared pointer. | |
const lldb::StackFrameSP & | GetFrameSP () const |
Get accessor to get the frame shared pointer. | |
void | SetTargetSP (const lldb::TargetSP &target_sp) |
Set accessor to set only the target shared pointer. | |
void | SetProcessSP (const lldb::ProcessSP &process_sp) |
Set accessor to set only the process shared pointer. | |
void | SetThreadSP (const lldb::ThreadSP &thread_sp) |
Set accessor to set only the thread shared pointer. | |
void | SetFrameSP (const lldb::StackFrameSP &frame_sp) |
Set accessor to set only the frame shared pointer. | |
void | SetTargetPtr (Target *target) |
Set accessor to set only the target shared pointer from a target pointer. | |
void | SetProcessPtr (Process *process) |
Set accessor to set only the process shared pointer from a process pointer. | |
void | SetThreadPtr (Thread *thread) |
Set accessor to set only the thread shared pointer from a thread pointer. | |
void | SetFramePtr (StackFrame *frame) |
Set accessor to set only the frame shared pointer from a frame pointer. | |
void | SetContext (const lldb::TargetSP &target_sp, bool get_process) |
void | SetContext (const lldb::ProcessSP &process_sp) |
void | SetContext (const lldb::ThreadSP &thread_sp) |
void | SetContext (const lldb::StackFrameSP &frame_sp) |
bool | HasTargetScope () const |
Returns true the ExecutionContext object contains a valid target. | |
bool | HasProcessScope () const |
Returns true the ExecutionContext object contains a valid target and process. | |
bool | HasThreadScope () const |
Returns true the ExecutionContext object contains a valid target, process, and thread. | |
bool | HasFrameScope () const |
Returns true the ExecutionContext object contains a valid target, process, thread and frame. |
Protected Attributes | |
lldb::TargetSP | m_target_sp |
The target that owns the process/thread/frame. | |
lldb::ProcessSP | m_process_sp |
The process that owns the thread/frame. | |
lldb::ThreadSP | m_thread_sp |
The thread that owns the frame. | |
lldb::StackFrameSP | m_frame_sp |
The stack frame in thread. |
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
This baton object can be passed into any function that requires a context that specifies a target, process, thread and frame. These objects are designed to be used for short term execution context object storage while a function might be trying to evaluate something that requires a thread or frame. ExecutionContextRef objects can be used to initialize one of these objects to turn the weak execution context object references to the target, process, thread and frame into strong references (shared pointers) so that functions can guarantee that these objects won't go away in the middle of a function.
ExecutionContext objects should be used as short lived objects (typically on the stack) in order to lock down an execution context for local use and for passing down to other functions that also require specific contexts. They should NOT be used for long term storage, for long term storage use ExecutionContextRef objects.
Definition at line 293 of file ExecutionContext.h.
ExecutionContext::ExecutionContext | ( | ) |
Default Constructor.
Definition at line 21 of file ExecutionContext.cpp.
References m_frame_sp, m_process_sp, m_target_sp, and m_thread_sp.
Referenced by ExecutionContext(), operator!=(), operator=(), operator==(), and ~ExecutionContext().
|
default |
References ExecutionContext().
Definition at line 80 of file ExecutionContext.cpp.
References DoNoSelectMostRelevantFrame, lldb_private::Target::GetProcessSP(), m_frame_sp, m_process_sp, m_target_sp, and m_thread_sp.
ExecutionContext::ExecutionContext | ( | const lldb::TargetSP & | target_sp, |
bool | get_process ) |
Definition at line 26 of file ExecutionContext.cpp.
References m_frame_sp, m_process_sp, m_target_sp, m_thread_sp, and SetContext().
ExecutionContext::ExecutionContext | ( | const lldb::ProcessSP & | process_sp | ) |
Definition at line 33 of file ExecutionContext.cpp.
References m_frame_sp, m_process_sp, m_target_sp, m_thread_sp, and SetContext().
ExecutionContext::ExecutionContext | ( | const lldb::ThreadSP & | thread_sp | ) |
Definition at line 39 of file ExecutionContext.cpp.
References m_frame_sp, m_process_sp, m_target_sp, m_thread_sp, and SetContext().
ExecutionContext::ExecutionContext | ( | const lldb::StackFrameSP & | frame_sp | ) |
Definition at line 45 of file ExecutionContext.cpp.
References m_frame_sp, m_process_sp, m_target_sp, m_thread_sp, and SetContext().
ExecutionContext::ExecutionContext | ( | const lldb::TargetWP & | target_wp, |
bool | get_process ) |
Definition at line 51 of file ExecutionContext.cpp.
References m_frame_sp, m_process_sp, m_target_sp, m_thread_sp, and SetContext().
ExecutionContext::ExecutionContext | ( | const lldb::ProcessWP & | process_wp | ) |
Definition at line 59 of file ExecutionContext.cpp.
References m_frame_sp, m_process_sp, m_target_sp, m_thread_sp, and SetContext().
ExecutionContext::ExecutionContext | ( | const lldb::ThreadWP & | thread_wp | ) |
Definition at line 66 of file ExecutionContext.cpp.
References m_frame_sp, m_process_sp, m_target_sp, m_thread_sp, and SetContext().
ExecutionContext::ExecutionContext | ( | const lldb::StackFrameWP & | frame_wp | ) |
Definition at line 73 of file ExecutionContext.cpp.
References m_frame_sp, m_process_sp, m_target_sp, m_thread_sp, and SetContext().
ExecutionContext::ExecutionContext | ( | const ExecutionContextRef & | exe_ctx_ref | ) |
Definition at line 110 of file ExecutionContext.cpp.
References GetFrameSP(), GetProcessSP(), GetTargetSP(), GetThreadSP(), m_frame_sp, m_process_sp, m_target_sp, and m_thread_sp.
ExecutionContext::ExecutionContext | ( | const ExecutionContextRef * | exe_ctx_ref, |
bool | thread_and_frame_only_if_stopped = false ) |
Definition at line 116 of file ExecutionContext.cpp.
References lldb_private::ExecutionContextRef::GetFrameSP(), lldb_private::ExecutionContextRef::GetProcessSP(), lldb_private::ExecutionContextRef::GetTargetSP(), lldb_private::ExecutionContextRef::GetThreadSP(), m_frame_sp, m_process_sp, m_target_sp, m_thread_sp, and lldb_private::StateIsStoppedState().
ExecutionContext::ExecutionContext | ( | ExecutionContextScope * | exe_scope | ) |
Definition at line 173 of file ExecutionContext.cpp.
References lldb_private::ExecutionContextScope::CalculateExecutionContext(), m_frame_sp, m_process_sp, m_target_sp, and m_thread_sp.
ExecutionContext::ExecutionContext | ( | ExecutionContextScope & | exe_scope | ) |
Definition at line 179 of file ExecutionContext.cpp.
References lldb_private::ExecutionContextScope::CalculateExecutionContext().
ExecutionContext::ExecutionContext | ( | Process * | process, |
Thread * | thread = nullptr, | ||
StackFrame * | frame = nullptr ) |
Construct with process, thread, and frame index.
Initialize with process p, thread t, and frame index f.
[in] | process | The process for this execution context. |
[in] | thread | The thread for this execution context. |
[in] | frame | The frame index for this execution context. |
Definition at line 97 of file ExecutionContext.cpp.
References lldb_private::Process::GetTarget(), m_frame_sp, m_process_sp, m_target_sp, and m_thread_sp.
|
default |
References ExecutionContext().
void ExecutionContext::Clear | ( | ) |
Clear the object's state.
Sets the process and thread to nullptr, and the frame index to an invalid value.
Definition at line 183 of file ExecutionContext.cpp.
References m_frame_sp, m_process_sp, m_target_sp, and m_thread_sp.
Referenced by lldb_private::StoppedExecutionContext::AllowResume(), and lldb_private::Target::CalculateExecutionContext().
uint32_t ExecutionContext::GetAddressByteSize | ( | ) | const |
Definition at line 192 of file ExecutionContext.cpp.
References m_process_sp, and m_target_sp.
Referenced by lldb_private::ValueObject::AddressOf(), lldb_private::ValueObjectConstResultImpl::AddressOf(), lldb_private::ValueObject::CreateValueObjectFromAddress(), lldb_private::ValueObject::CreateValueObjectFromAPInt(), lldb_private::ValueObject::CreateValueObjectFromBool(), lldb_private::ValueObject::CreateValueObjectFromNullptr(), and lldb_private::IRExecutionUnit::GetAddressByteSize().
ExecutionContextScope * ExecutionContext::GetBestExecutionContextScope | ( | ) | const |
Definition at line 232 of file ExecutionContext.cpp.
References m_frame_sp, m_process_sp, m_target_sp, and m_thread_sp.
Referenced by lldb_private::ClangExpressionDeclMap::AddPersistentVariable(), lldb_private::ValueObject::AddressOf(), lldb_private::ValueObjectConstResultImpl::AddressOf(), lldb_private::Watchpoint::CaptureWatchedValue(), lldb_private::ValueObject::Cast(), lldb_private::ValueObject::CastPointerType(), lldb_private::ValueObject::CastPointerType(), lldb_private::ValueObject::CastToBasicType(), lldb_private::ValueObject::CastToEnumType(), lldb_private::ClangUserExpression::Complete(), lldb_private::ValueObject::CreateConstantValue(), lldb_private::ValueObject::CreateValueObjectFromAddress(), lldb_private::ValueObject::CreateValueObjectFromData(), lldb_private::ValueObject::CreateValueObjectFromScalar(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), lldb_private::StackFrame::Dump(), DumpAddressAndContent(), CommandObjectTargetVariable::DumpGlobalVariableList(), CommandObjectRegisterRead::DumpRegister(), lldb_private::UserExpression::Evaluate(), ExtractLibcxxStringInfo(), lldb_private::LLVMUserExpression::FinalizeJITExecution(), lldb_private::TypeFormatImpl_EnumType::FormatObject(), lldb_private::TypeFormatImpl_Format::FormatObject(), lldb_private::ValueObjectConstResult::GetByteSize(), lldb_private::ValueObjectMemory::GetByteSize(), lldb_private::ValueObjectVariable::GetByteSize(), lldb_private::formatters::BlockPointerSyntheticFrontEnd::GetChildAtIndex(), lldb_private::TypeSystemClang::GetChildCompilerTypeAtIndex(), lldb_private::AppleObjCRuntime::GetObjectDescription(), lldb_private::ValueObject::GetPointeeData(), lldb_private::FormatManager::GetPossibleMatches(), lldb_private::ValueObject::GetSyntheticBase(), lldb_private::ValueObject::GetSyntheticChildAtOffset(), lldb_private::Value::GetValueAsData(), lldb_private::Value::GetValueByteSize(), lldb_private::CPlusPlusLanguage::HandleFrameFormatVariable(), lldb_private::ClangUtilityFunction::Install(), LoadValueFromConsecutiveGPRRegisters(), LoadValueFromConsecutiveGPRRegisters(), LookupAddressInModule(), LookupFileAndLineInModule(), LookupFunctionInModule(), LookupSymbolInModule(), PrintFunctionNameWithArgs(), PrintFunctionNameWithArgs(), lldb_private::Type::ReadFromMemory(), lldb_private::Value::ResolveValue(), lldb_private::ClangUserExpression::TryParse(), lldb_private::ValueObjectChild::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), and lldb_private::Watchpoint::WatchedValueReportable().
lldb::ByteOrder ExecutionContext::GetByteOrder | ( | ) | const |
Definition at line 200 of file ExecutionContext.cpp.
References lldb_private::endian::InlHostByteOrder(), m_process_sp, and m_target_sp.
Referenced by lldb_private::ValueObject::CreateValueObjectFromAddress(), lldb_private::ValueObject::CreateValueObjectFromAPInt(), lldb_private::ValueObject::CreateValueObjectFromBool(), lldb_private::ValueObject::CreateValueObjectFromNullptr(), and lldb_private::IRExecutionUnit::GetByteOrder().
|
inline |
Returns a pointer to the frame object.
The returned pointer might be nullptr. Calling HasFrameScope(), can help to pre-validate this pointer so that this accessor can freely be used without having to check for nullptr each time.
Definition at line 403 of file ExecutionContext.h.
References m_frame_sp.
Referenced by lldb_private::Variable::AutoComplete(), lldb_private::OptionArgParser::DoToAddress(), lldb_private::DWARFExpression::Evaluate(), lldb_private::DWARFExpressionList::Evaluate(), lldb_private::UserExpression::Evaluate(), Evaluate_DW_OP_entry_value(), lldb::SBTarget::EvaluateExpression(), lldb::SBValue::EvaluateExpression(), lldb_private::Target::StopHook::ExecutionContextPasses(), lldb_private::FormatEntity::Format(), lldb_private::StringSummaryFormat::FormatObject(), GetModuleConfig(), lldb_private::AppleObjCRuntime::GetObjectDescription(), lldb_private::ClangExpressionSourceCode::GetText(), lldb_private::ClangDynamicCheckerFunctions::Install(), lldb_private::ValueObjectVariable::IsInScope(), lldb_private::Thread::JumpToLine(), lldb_private::CommandInterpreter::PreprocessToken(), lldb_private::Disassembler::PrintInstructions(), lldb_private::ClangUserExpression::ScanContext(), SetupDeclVendor(), lldb_private::ValueObjectRegister::UpdateValue(), lldb_private::ValueObjectRegisterSet::UpdateValue(), and lldb_private::ClangExpressionDeclMap::WillParse().
StackFrame & ExecutionContext::GetFrameRef | ( | ) | const |
Returns a reference to the thread object.
Clients should call HasFrameScope() prior to calling this function to ensure that this ExecutionContext object contains a valid target.
Definition at line 257 of file ExecutionContext.cpp.
References m_frame_sp.
Referenced by lldb_private::Process::RunThreadPlan().
|
inline |
Get accessor to get the frame shared pointer.
The returned shared pointer is not guaranteed to be valid.
Definition at line 464 of file ExecutionContext.h.
References m_frame_sp.
Referenced by lldb_private::ClangUserExpression::AddArguments(), lldb_private::ScriptInterpreterLua::BreakpointCallbackFunction(), lldb_private::ValueObject::CreateValueObjectFromExpression(), lldb_private::ClangExpressionParser::DoPrepareForExecution(), lldb_private::ValueObject::EvaluationPoint::EvaluationPoint(), ExecutionContext(), lldb_private::CommandInterpreter::GetFrameLanguageCommand(), lldb_private::UserExpression::InstallContext(), lldb_private::UserExpression::LockAndCheckContext(), lldb_private::ExecutionContextRef::operator=(), lldb_private::plugin::dwarf::DWARFASTParser::ParseChildArrayInfo(), lldb_private::Statusline::Redraw(), and lldb_private::ScriptInterpreterLua::WatchpointCallbackFunction().
Process * ExecutionContext::GetProcessPtr | ( | ) | const |
Returns a pointer to the process object.
The returned pointer might be nullptr. Calling HasProcessScope(), HasThreadScope(), or HasFrameScope() can help to pre-validate this pointer so that this accessor can freely be used without having to check for nullptr each time.
Definition at line 224 of file ExecutionContext.cpp.
References m_process_sp, and m_target_sp.
Referenced by lldb_private::ValueObject::CalculateDynamicValue(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), lldb_private::StopInfoMachException::DeterminePtrauthFailure(), lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::LLVMUserExpression::DoExecute(), lldb_private::ClangExpressionParser::DoPrepareForExecution(), lldb_private::ValueObjectVariable::DoUpdateChildrenAddressType(), lldb_private::Address::Dump(), CommandObjectRegisterRead::DumpRegister(), lldb_private::Thread::DumpUsingFormat(), lldb_private::DWARFExpression::Evaluate(), lldb_private::UserExpression::Evaluate(), lldb::SBTarget::EvaluateExpression(), lldb_private::FunctionCaller::ExecuteFunction(), lldb_private::FunctionCaller::FetchFunctionResults(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), lldb_private::FormatEntity::Format(), lldb_private::RegisterContextUnwind::GetAbstractRegisterLocation(), lldb_private::TypeSystemClang::GetChildCompilerTypeAtIndex(), lldb_private::ObjCLanguageRuntime::GetClassDescriptor(), lldb_private::ValueObjectConstResult::GetDynamicValue(), lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), lldb_private::TypeSystemClang::GetObjCBitSize(), lldb_private::AppleObjCRuntime::GetObjectDescription(), lldb_private::ValueObject::GetObjectDescription(), ProcessOptionValueProperties::GetPropertyAtIndex(), ABIMacOSX_arm64::GetReturnValueObjectImpl(), ABISysV_arm64::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_mips::GetReturnValueObjectImpl(), lldb_private::Thread::GetStatus(), lldb_private::ClangExpressionDeclMap::GetTargetInfo(), lldb_private::Value::GetValueAsData(), GetVBaseBitOffset(), lldb_private::ItaniumABILanguageRuntime::GetVTableInfo(), lldb_private::RegisterContextUnwind::InitializeNonZerothFrame(), lldb_private::RegisterContextUnwind::InitializeZerothFrame(), lldb_private::FunctionCaller::InsertFunction(), lldb_private::ClangDynamicCheckerFunctions::Install(), lldb_private::ClangUtilityFunction::Install(), IRInterpreter::Interpret(), lldb_private::CommandInterpreter::IOHandlerInterrupt(), lldb_private::ValueObject::IsPossibleDynamicType(), lldb_private::formatters::LibcxxFunctionSummaryProvider(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), lldb_private::ClangUserExpression::Parse(), lldb_private::StopInfoBreakpoint::PerformAction(), lldb_private::ExpressionParser::PrepareForExecution(), lldb::SBBreakpointCallbackBaton::PrivateBreakpointHitCallback(), lldb_private::RegisterContextUnwind::PropagateTrapHandlerFlagFromUnwindPlan(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReadAllRegisterValues(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReadAllRegisterValues(), lldb_private::RegisterContextUnwind::ReadFrameAddress(), lldb_private::Type::ReadFromMemory(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReadRegisterBytes(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::RefreshTrampolines(), ResumeNewPlan(), lldb_private::Process::RunThreadPlan(), lldb_private::RegisterContextUnwind::SavedLocationForRegister(), lldb_private::ValueObject::SetData(), CommandObjectProcessLoad::CommandOptions::SetOptionValue(), lldb_private::ValueObject::SetValueFromCString(), lldb_private::ValueObject::EvaluationPoint::SyncWithProcessState(), lldb_private::CommandCompletions::ThreadIDs(), lldb_private::CommandCompletions::ThreadIndexes(), lldb_private::OptionArgParser::ToAddress(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectRegister::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ClangExpressionDeclMap::WillParse(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues(), lldb_private::FunctionCaller::WriteFunctionArguments(), lldb_private::FunctionCaller::WriteFunctionWrapper(), and lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteRegisterBytes().
Process & ExecutionContext::GetProcessRef | ( | ) | const |
Returns a reference to the process object.
Clients should call HasProcessScope(), HasThreadScope(), or HasFrameScope() prior to calling this function to ensure that this ExecutionContext object contains a valid target.
Definition at line 247 of file ExecutionContext.cpp.
References m_process_sp.
Referenced by lldb_private::FunctionCaller::DeallocateFunctionResults(), lldb_private::LLVMUserExpression::DoExecute(), lldb_private::FunctionCaller::ExecuteFunction(), ABIMacOSX_arm64::GetArgumentValues(), ABIMacOSX_arm::GetArgumentValues(), ABISysV_arm64::GetArgumentValues(), ABISysV_arm::GetArgumentValues(), ABIMacOSX_arm64::GetReturnValueObjectImpl(), ABISysV_arm64::GetReturnValueObjectImpl(), GetSingleThreadFromArgs(), LoadValueFromConsecutiveGPRRegisters(), LoadValueFromConsecutiveGPRRegisters(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReconfigureRegisterInfo(), and lldb_private::process_gdb_remote::GDBRemoteRegisterContext::RegisterWriteCausesReconfigure().
|
inline |
Get accessor to get the process shared pointer.
The returned shared pointer is not guaranteed to be valid.
Definition at line 454 of file ExecutionContext.h.
References m_process_sp.
Referenced by lldb_private::ClangExpressionParser::DoPrepareForExecution(), lldb_private::ValueObject::EvaluationPoint::EvaluationPoint(), ExecutionContext(), lldb_private::UserExpression::InstallContext(), lldb_private::REPL::IOHandlerInputComplete(), lldb_private::UserExpression::LockAndCheckContext(), PlatformPOSIX::MakeLoadImageUtilityFunction(), lldb_private::ExecutionContextRef::operator=(), lldb_private::CommandObjectExpression::CommandOptions::OptionParsingStarting(), ThreadStepScopeOptionGroup::OptionParsingStarting(), lldb_private::StopInfoWatchpoint::PerformAction(), lldb_private::Statusline::Redraw(), and lldb_private::StopInfoWatchpoint::ShouldStopSynchronous().
RegisterContext * ExecutionContext::GetRegisterContext | ( | ) | const |
Definition at line 208 of file ExecutionContext.cpp.
References m_frame_sp, and m_thread_sp.
Referenced by lldb_private::StopInfoMachException::DeterminePtrauthFailure(), Evaluate_DW_OP_entry_value(), lldb_private::IndirectCallEdge::GetCallee(), lldb_private::Thread::JumpToLine(), lldb_private::CommandCompletions::Registers(), lldb_private::ValueObjectVariable::SetData(), and lldb_private::ValueObjectVariable::SetValueFromCString().
Target * ExecutionContext::GetTargetPtr | ( | ) | const |
Returns a pointer to the target object.
The returned pointer might be nullptr. Calling HasTargetScope(), HasProcessScope(), HasThreadScope(), or HasFrameScope() can help to pre- validate this pointer so that this accessor can freely be used without having to check for nullptr each time.
Definition at line 216 of file ExecutionContext.cpp.
References m_process_sp, and m_target_sp.
Referenced by lldb_private::ClangExpressionDeclMap::AddPersistentVariable(), lldb_private::OptionValueUUID::AutoComplete(), lldb_private::ScriptInterpreterLua::BreakpointCallbackFunction(), lldb_private::BreakpointOptions::BreakpointOptionsCallbackFunction(), InstructionLLVMC::CalculateMnemonicOperandsAndComment(), CalculateSymbolInfo(), lldb_private::StopInfoMachException::CreateStopReasonWithMachException(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), lldb_private::StopInfoMachException::DeterminePtrauthFailure(), lldb_private::Disassembler::Disassemble(), lldb_private::StackFrame::Disassemble(), lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::OptionArgParser::DoToAddress(), lldb_private::Address::Dump(), lldb_private::StackFrame::Dump(), DumpCompileUnitLineTable(), DumpModuleSections(), DumpModuleSymtab(), OutputWriterCLI::DumpSegmentContext(), lldb_private::StackFrame::DumpUsingSettingsFormat(), lldb::SBInstruction::EmulateWithFrame(), lldb_private::DWARFExpression::Evaluate(), lldb_private::DWARFExpressionList::Evaluate(), lldb_private::UserExpression::Evaluate(), lldb::SBTarget::EvaluateExpression(), lldb_private::UserExpression::Execute(), lldb_private::FunctionCaller::ExecuteFunction(), UnwindAssembly_x86::FirstNonPrologueInsn(), lldb_private::FormatEntity::Format(), lldb_private::RegisterContextUnwind::GetAbstractRegisterLocation(), lldb_private::IRExecutionUnit::GetArchitecture(), lldb_private::IndirectCallEdge::GetCallee(), lldb_private::ValueObjectRegister::GetCompilerTypeImpl(), lldb_private::StopInfoMachException::GetDescription(), lldb_private::StackFrame::GetFrameBaseValue(), lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), lldb_private::IRExecutionUnit::GetJITModule(), GetModuleConfig(), lldb_private::AppleObjCRuntime::GetObjectDescription(), lldb_private::CommandInterpreter::GetPlatform(), lldb_private::ValueObject::GetPointeeData(), ABIMacOSX_arm64::GetReturnValueObjectImpl(), ABISysV_arm64::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_ppc::GetReturnValueObjectImpl(), ABISysV_x86_64::GetReturnValueObjectImpl(), ABIWindows_x86_64::GetReturnValueObjectImpl(), lldb_private::StackFrame::GetStatus(), lldb_private::Thread::GetStatus(), lldb_private::Target::GetTargetFromContexts(), lldb_private::ClangExpressionDeclMap::GetTargetInfo(), lldb_private::ClangExpressionSourceCode::GetText(), lldb_private::Value::GetValueAsData(), lldb_private::Target::StopHookCommandLine::HandleStop(), lldb_private::Target::StopHookScripted::HandleStop(), lldb_private::RegisterContextUnwind::InitializeNonZerothFrame(), lldb_private::RegisterContextUnwind::InitializeZerothFrame(), lldb_private::ClangUtilityFunction::Install(), IRInterpreter::Interpret(), lldb_private::Thread::JumpToLine(), LookupAddressInModule(), lldb_private::CommandCompletions::ModuleUUIDs(), lldb_private::CommandObjectDisassemble::CommandOptions::OptionParsingStarting(), lldb_private::ClangUserExpression::Parse(), lldb_private::CommandInterpreter::PreprocessToken(), ReadAddress(), lldb_private::ValueObject::ReadPointedString(), ResolveLoadAddress(), lldb_private::ClangUserExpression::ScanContext(), lldb_private::ClangUserExpression::SetupPersistentState(), lldb_private::AppleThreadPlanStepThroughObjCTrampoline::ShouldStop(), lldb_private::ValueObject::EvaluationPoint::SyncWithProcessState(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ScriptInterpreterLua::WatchpointCallbackFunction(), lldb_private::CommandCompletions::WatchPointIDs(), lldb_private::ClangExpressionDeclMap::WillParse(), and lldb_private::FunctionCaller::WriteFunctionArguments().
Target & ExecutionContext::GetTargetRef | ( | ) | const |
Returns a reference to the target object.
Clients should call HasTargetScope(), HasProcessScope(), HasThreadScope(), or HasFrameScope() prior to calling this function to ensure that this ExecutionContext object contains a valid target.
Definition at line 242 of file ExecutionContext.cpp.
References m_target_sp.
Referenced by lldb_private::ClangUserExpression::AddArguments(), CalculateDisass(), lldb_private::Disassembler::Disassemble(), lldb_private::InstructionList::Dump(), CommandObjectRegisterRead::DumpRegister(), lldb_private::Thread::DumpUsingSettingsFormat(), Evaluate_DW_OP_entry_value(), lldb_private::Debugger::FormatDisassemblerAddress(), lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), lldb_private::Function::GetInstructions(), lldb_private::Symbol::GetInstructions(), lldb_private::Value::GetValueAsData(), lldb_private::StackFrame::GetValueForVariableExpressionPath(), lldb_private::StopInfoBreakpoint::PerformAction(), lldb_private::StopInfoWatchpoint::PerformAction(), lldb_private::Disassembler::PrintInstructions(), lldb::SBBreakpointCallbackBaton::PrivateBreakpointHitCallback(), lldb_private::AppleObjCTrampolineHandler::SetupDispatchFunction(), lldb_private::AppleGetItemInfoHandler::SetupGetItemInfoFunction(), lldb_private::AppleGetPendingItemsHandler::SetupGetPendingItemsFunction(), lldb_private::AppleGetQueuesHandler::SetupGetQueuesFunction(), and lldb_private::AppleGetThreadItemInfoHandler::SetupGetThreadItemInfoFunction().
|
inline |
Get accessor to get the target shared pointer.
The returned shared pointer is not guaranteed to be valid.
Definition at line 449 of file ExecutionContext.h.
References m_target_sp.
Referenced by lldb_private::ValueObject::CreateValueObjectFromExpression(), lldb_private::ClangExpressionParser::DoPrepareForExecution(), lldb_private::Instruction::Dump(), CommandObjectRegisterRead::DumpRegister(), lldb_private::Disassembler::ElideMixedSourceAndDisassemblyLine(), lldb_private::ValueObject::EvaluationPoint::EvaluationPoint(), ExecutionContext(), lldb_private::Thread::JumpToLine(), lldb_private::UserExpression::LockAndCheckContext(), lldb_private::ExecutionContextRef::operator=(), lldb_private::OptionGroupValueObjectDisplay::OptionParsingStarting(), ThreadStepScopeOptionGroup::OptionParsingStarting(), lldb_private::Options::Parse(), lldb_private::OptionGroupFormat::ParserGDBFormatLetter(), lldb_private::Disassembler::PrintInstructions(), lldb_private::ClangUserExpression::ClangUserExpressionHelper::ResetDeclMap(), lldb_private::ClangUtilityFunction::ClangUtilityFunctionHelper::ResetDeclMap(), CommandObjectPlatformProcessList::CommandOptions::SetOptionValue(), lldb_private::CommandObjectDisassemble::CommandOptions::SetOptionValue(), lldb_private::CommandOptionsProcessLaunch::SetOptionValue(), lldb_private::Debugger::SetPropertyValue(), lldb_private::Watchpoint::SetupVariableWatchpointDisabler(), lldb_private::CommandCompletions::StopHookIDs(), and lldb_private::ClangExpressionDeclMap::WillParse().
|
inline |
Returns a pointer to the thread object.
The returned pointer might be nullptr. Calling HasThreadScope() or HasFrameScope() can help to pre-validate this pointer so that this accessor can freely be used without having to check for nullptr each time.
Definition at line 394 of file ExecutionContext.h.
References m_thread_sp.
Referenced by lldb_private::StopInfoMachException::DeterminePtrauthFailure(), lldb_private::DWARFExpression::Evaluate(), Evaluate_DW_OP_entry_value(), lldb_private::FormatEntity::Format(), lldb_private::AppleObjCRuntime::GetObjectDescription(), ThreadOptionValueProperties::GetPropertyAtIndex(), lldb_private::FunctionCaller::GetThreadPlanToCallFunction(), IRInterpreter::Interpret(), lldb_private::REPL::IOHandlerInputComplete(), lldb::SBBreakpointCallbackBaton::PrivateBreakpointHitCallback(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReadAllRegisterValues(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReadAllRegisterValues(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReadRegisterBytes(), ResumeNewPlan(), lldb_private::Process::RunThreadPlan(), lldb_private::ClangExpressionDeclMap::WillParse(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues(), and lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteRegisterBytes().
Thread & ExecutionContext::GetThreadRef | ( | ) | const |
Returns a reference to the thread object.
Clients should call HasThreadScope(), or HasFrameScope() prior to calling this function to ensure that this ExecutionContext object contains a valid target.
Definition at line 252 of file ExecutionContext.cpp.
References m_thread_sp.
Referenced by lldb_private::LLVMUserExpression::DoExecute(), lldb_private::Target::StopHook::ExecutionContextPasses(), IRInterpreter::Interpret(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::RefreshTrampolines(), and lldb_private::ExpressionParser::RunStaticInitializers().
|
inline |
Get accessor to get the thread shared pointer.
The returned shared pointer is not guaranteed to be valid.
Definition at line 459 of file ExecutionContext.h.
References m_thread_sp.
Referenced by lldb_private::Disassembler::ElideMixedSourceAndDisassemblyLine(), lldb_private::UserExpression::Evaluate(), lldb_private::ValueObject::EvaluationPoint::EvaluationPoint(), lldb_private::FunctionCaller::ExecuteFunction(), ExecutionContext(), lldb_private::CommandCompletions::FrameIndexes(), GetSingleThreadFromArgs(), lldb_private::FunctionCaller::InsertFunction(), lldb_private::ExecutionContextRef::operator=(), and lldb_private::BreakpointOptionGroup::SetOptionValue().
bool ExecutionContext::HasFrameScope | ( | ) | const |
Returns true the ExecutionContext object contains a valid target, process, thread and frame.
This function can be called after initializing an ExecutionContext object, and if it returns true, calls to GetTargetPtr(), GetTargetRef(), GetProcessPtr(), GetProcessRef(), GetThreadPtr(), GetThreadRef(), GetFramePtr(), and GetFrameRef() do not need to be checked for validity.
Definition at line 409 of file ExecutionContext.cpp.
References HasThreadScope(), and m_frame_sp.
Referenced by lldb_private::Process::RunThreadPlan().
bool ExecutionContext::HasProcessScope | ( | ) | const |
Returns true the ExecutionContext object contains a valid target and process.
This function can be called after initializing an ExecutionContext object, and if it returns true, calls to GetTargetPtr() and GetTargetRef(), GetProcessPtr(), and GetProcessRef(), do not need to be checked for validity.
Definition at line 401 of file ExecutionContext.cpp.
References HasTargetScope(), and m_process_sp.
Referenced by lldb_private::StopInfoMachException::DeterminePtrauthFailure(), lldb_private::CommandCompletions::FrameIndexes(), lldb_private::AppleObjCRuntime::GetObjectDescription(), HasThreadScope(), lldb_private::CommandCompletions::ThreadIDs(), and lldb_private::CommandCompletions::ThreadIndexes().
bool ExecutionContext::HasTargetScope | ( | ) | const |
Returns true the ExecutionContext object contains a valid target.
This function can be called after initializing an ExecutionContext object, and if it returns true, calls to GetTargetPtr() and GetTargetRef() do not need to be checked for validity.
Definition at line 397 of file ExecutionContext.cpp.
References m_target_sp.
Referenced by lldb_private::StopInfoMachException::DeterminePtrauthFailure(), lldb_private::InstructionList::Dump(), Evaluate_DW_OP_entry_value(), lldb_private::Debugger::FormatDisassemblerAddress(), lldb_private::Function::GetInstructions(), lldb_private::Symbol::GetInstructions(), HasProcessScope(), lldb_private::CommandInterpreter::IOHandlerInputComplete(), lldb_private::CommandCompletions::ModuleUUIDs(), lldb_private::Disassembler::PrintInstructions(), lldb_private::Statusline::Redraw(), and lldb_private::CommandCompletions::WatchPointIDs().
bool ExecutionContext::HasThreadScope | ( | ) | const |
Returns true the ExecutionContext object contains a valid target, process, and thread.
This function can be called after initializing an ExecutionContext object, and if it returns true, calls to GetTargetPtr(), GetTargetRef(), GetProcessPtr(), GetProcessRef(), GetThreadPtr(), and GetThreadRef() do not need to be checked for validity.
Definition at line 405 of file ExecutionContext.cpp.
References HasProcessScope(), and m_thread_sp.
Referenced by lldb_private::StopInfoMachException::DeterminePtrauthFailure(), lldb_private::LLVMUserExpression::DoExecute(), HasFrameScope(), lldb_private::ExpressionParser::PrepareForExecution(), and lldb_private::ExpressionParser::RunStaticInitializers().
bool ExecutionContext::operator!= | ( | const ExecutionContext & | rhs | ) | const |
Definition at line 393 of file ExecutionContext.cpp.
References ExecutionContext().
ExecutionContext & ExecutionContext::operator= | ( | const ExecutionContext & | rhs | ) |
Definition at line 363 of file ExecutionContext.cpp.
References ExecutionContext(), m_frame_sp, m_process_sp, m_target_sp, and m_thread_sp.
bool ExecutionContext::operator== | ( | const ExecutionContext & | rhs | ) | const |
Definition at line 373 of file ExecutionContext.cpp.
References ExecutionContext(), m_frame_sp, m_process_sp, m_target_sp, and m_thread_sp.
void ExecutionContext::SetContext | ( | const lldb::ProcessSP & | process_sp | ) |
Definition at line 317 of file ExecutionContext.cpp.
References m_frame_sp, m_process_sp, m_target_sp, and m_thread_sp.
void ExecutionContext::SetContext | ( | const lldb::StackFrameSP & | frame_sp | ) |
Definition at line 342 of file ExecutionContext.cpp.
References m_frame_sp, m_process_sp, m_target_sp, and m_thread_sp.
void ExecutionContext::SetContext | ( | const lldb::TargetSP & | target_sp, |
bool | get_process ) |
Definition at line 306 of file ExecutionContext.cpp.
References m_frame_sp, m_process_sp, m_target_sp, and m_thread_sp.
Referenced by lldb_private::StackFrame::CalculateExecutionContext(), lldb_private::Thread::CalculateExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), and lldb_private::AppleObjCRuntime::GetObjectDescription().
void ExecutionContext::SetContext | ( | const lldb::ThreadSP & | thread_sp | ) |
Definition at line 327 of file ExecutionContext.cpp.
References m_frame_sp, m_process_sp, m_target_sp, and m_thread_sp.
void ExecutionContext::SetFramePtr | ( | StackFrame * | frame | ) |
Set accessor to set only the frame shared pointer from a frame pointer.
Definition at line 299 of file ExecutionContext.cpp.
References m_frame_sp.
Referenced by lldb_private::Process::CalculateExecutionContext(), and lldb_private::StackFrameList::SynthesizeTailCallFrames().
void ExecutionContext::SetFrameSP | ( | const lldb::StackFrameSP & | frame_sp | ) |
Set accessor to set only the frame shared pointer.
Definition at line 274 of file ExecutionContext.cpp.
References m_frame_sp.
Referenced by lldb_private::Thread::DumpUsingFormat(), Evaluate_DW_OP_entry_value(), lldb_private::AppleObjCRuntime::GetObjectDescription(), lldb_private::REPL::IOHandlerInputComplete(), lldb_private::Process::RunThreadPlan(), and lldb_private::StoppedExecutionContext::StoppedExecutionContext().
void ExecutionContext::SetProcessPtr | ( | Process * | process | ) |
Set accessor to set only the process shared pointer from a process pointer.
Definition at line 285 of file ExecutionContext.cpp.
References m_process_sp.
Referenced by lldb_private::Process::CalculateExecutionContext().
void ExecutionContext::SetProcessSP | ( | const lldb::ProcessSP & | process_sp | ) |
Set accessor to set only the process shared pointer.
Definition at line 266 of file ExecutionContext.cpp.
References m_process_sp.
Referenced by lldb::SBInstruction::GetComment(), lldb::SBInstruction::GetControlFlowKind(), lldb::SBInstruction::GetMnemonic(), lldb::SBInstruction::GetOperands(), and lldb_private::StoppedExecutionContext::StoppedExecutionContext().
void ExecutionContext::SetTargetPtr | ( | Target * | target | ) |
Set accessor to set only the target shared pointer from a target pointer.
Definition at line 278 of file ExecutionContext.cpp.
References m_target_sp.
Referenced by lldb_private::Process::CalculateExecutionContext(), lldb_private::Target::CalculateExecutionContext(), and lldb_private::Statusline::Redraw().
void ExecutionContext::SetTargetSP | ( | const lldb::TargetSP & | target_sp | ) |
Set accessor to set only the target shared pointer.
Definition at line 262 of file ExecutionContext.cpp.
References m_target_sp.
Referenced by lldb_private::StoppedExecutionContext::StoppedExecutionContext().
void ExecutionContext::SetThreadPtr | ( | Thread * | thread | ) |
Set accessor to set only the thread shared pointer from a thread pointer.
Definition at line 292 of file ExecutionContext.cpp.
References m_thread_sp.
Referenced by lldb_private::Process::CalculateExecutionContext().
void ExecutionContext::SetThreadSP | ( | const lldb::ThreadSP & | thread_sp | ) |
Set accessor to set only the thread shared pointer.
Definition at line 270 of file ExecutionContext.cpp.
References m_thread_sp.
Referenced by lldb_private::AppleObjCRuntime::GetObjectDescription(), and lldb_private::StoppedExecutionContext::StoppedExecutionContext().
|
protected |
The stack frame in thread.
Definition at line 559 of file ExecutionContext.h.
Referenced by Clear(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), GetBestExecutionContextScope(), GetFramePtr(), GetFrameRef(), GetFrameSP(), GetRegisterContext(), HasFrameScope(), operator=(), operator==(), SetContext(), SetContext(), SetContext(), SetContext(), SetFramePtr(), SetFrameSP(), and lldb_private::StoppedExecutionContext::StoppedExecutionContext().
|
protected |
The process that owns the thread/frame.
Definition at line 557 of file ExecutionContext.h.
Referenced by Clear(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), GetAddressByteSize(), GetBestExecutionContextScope(), GetByteOrder(), GetProcessPtr(), GetProcessRef(), GetProcessSP(), GetTargetPtr(), HasProcessScope(), operator=(), operator==(), SetContext(), SetContext(), SetContext(), SetContext(), SetProcessPtr(), SetProcessSP(), and lldb_private::StoppedExecutionContext::StoppedExecutionContext().
|
protected |
The target that owns the process/thread/frame.
Definition at line 556 of file ExecutionContext.h.
Referenced by Clear(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), GetAddressByteSize(), GetBestExecutionContextScope(), GetByteOrder(), GetProcessPtr(), GetTargetPtr(), GetTargetRef(), GetTargetSP(), HasTargetScope(), operator=(), operator==(), SetContext(), SetContext(), SetContext(), SetContext(), SetTargetPtr(), SetTargetSP(), and lldb_private::StoppedExecutionContext::StoppedExecutionContext().
|
protected |
The thread that owns the frame.
Definition at line 558 of file ExecutionContext.h.
Referenced by Clear(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), ExecutionContext(), GetBestExecutionContextScope(), GetRegisterContext(), GetThreadPtr(), GetThreadRef(), GetThreadSP(), HasThreadScope(), operator=(), operator==(), SetContext(), SetContext(), SetContext(), SetContext(), SetThreadPtr(), SetThreadSP(), and lldb_private::StoppedExecutionContext::StoppedExecutionContext().