LLDB mainline
|
#include <RegisterContext.h>
Public Member Functions | |
RegisterContext (Thread &thread, uint32_t concrete_frame_idx) | |
~RegisterContext () override | |
void | InvalidateIfNeeded (bool force) |
virtual void | InvalidateAllRegisters ()=0 |
virtual size_t | GetRegisterCount ()=0 |
virtual const RegisterInfo * | GetRegisterInfoAtIndex (size_t reg)=0 |
virtual size_t | GetRegisterSetCount ()=0 |
virtual const RegisterSet * | GetRegisterSet (size_t reg_set)=0 |
virtual lldb::ByteOrder | GetByteOrder () |
virtual bool | ReadRegister (const RegisterInfo *reg_info, RegisterValue ®_value)=0 |
virtual bool | WriteRegister (const RegisterInfo *reg_info, const RegisterValue ®_value)=0 |
virtual bool | ReadAllRegisterValues (lldb::WritableDataBufferSP &data_sp) |
virtual bool | WriteAllRegisterValues (const lldb::DataBufferSP &data_sp) |
virtual bool | RegisterWriteCausesReconfigure (const llvm::StringRef name) |
virtual bool | ReconfigureRegisterInfo () |
virtual bool | ReadAllRegisterValues (lldb_private::RegisterCheckpoint ®_checkpoint) |
virtual bool | WriteAllRegisterValues (const lldb_private::RegisterCheckpoint ®_checkpoint) |
bool | CopyFromRegisterContext (lldb::RegisterContextSP context) |
virtual uint32_t | ConvertRegisterKindToRegisterNumber (lldb::RegisterKind kind, uint32_t num) |
Convert from a given register numbering scheme to the lldb register numbering scheme. | |
virtual uint32_t | NumSupportedHardwareBreakpoints () |
virtual uint32_t | SetHardwareBreakpoint (lldb::addr_t addr, size_t size) |
virtual bool | ClearHardwareBreakpoint (uint32_t hw_idx) |
virtual uint32_t | NumSupportedHardwareWatchpoints () |
virtual uint32_t | SetHardwareWatchpoint (lldb::addr_t addr, size_t size, bool read, bool write) |
virtual bool | ClearHardwareWatchpoint (uint32_t hw_index) |
virtual bool | HardwareSingleStep (bool enable) |
virtual Status | ReadRegisterValueFromMemory (const lldb_private::RegisterInfo *reg_info, lldb::addr_t src_addr, uint32_t src_len, RegisterValue ®_value) |
virtual Status | WriteRegisterValueToMemory (const lldb_private::RegisterInfo *reg_info, lldb::addr_t dst_addr, uint32_t dst_len, const RegisterValue ®_value) |
virtual lldb::tid_t | GetThreadID () const |
virtual Thread & | GetThread () |
const RegisterInfo * | GetRegisterInfoByName (llvm::StringRef reg_name, uint32_t start_idx=0) |
const RegisterInfo * | GetRegisterInfo (lldb::RegisterKind reg_kind, uint32_t reg_num) |
uint64_t | GetPC (uint64_t fail_value=LLDB_INVALID_ADDRESS) |
uint64_t | GetThreadPointer (uint64_t fail_value=LLDB_INVALID_ADDRESS) |
bool | GetPCForSymbolication (Address &address) |
Get an address suitable for symbolication. | |
bool | SetPC (uint64_t pc) |
bool | SetPC (Address addr) |
uint64_t | GetSP (uint64_t fail_value=LLDB_INVALID_ADDRESS) |
bool | SetSP (uint64_t sp) |
uint64_t | GetFP (uint64_t fail_value=LLDB_INVALID_ADDRESS) |
bool | SetFP (uint64_t fp) |
const char * | GetRegisterName (uint32_t reg) |
uint64_t | GetReturnAddress (uint64_t fail_value=LLDB_INVALID_ADDRESS) |
uint64_t | GetFlags (uint64_t fail_value=0) |
uint64_t | ReadRegisterAsUnsigned (uint32_t reg, uint64_t fail_value) |
uint64_t | ReadRegisterAsUnsigned (const RegisterInfo *reg_info, uint64_t fail_value) |
bool | WriteRegisterFromUnsigned (uint32_t reg, uint64_t uval) |
bool | WriteRegisterFromUnsigned (const RegisterInfo *reg_info, uint64_t uval) |
bool | ConvertBetweenRegisterKinds (lldb::RegisterKind source_rk, uint32_t source_regnum, lldb::RegisterKind target_rk, uint32_t &target_regnum) |
lldb::TargetSP | CalculateTarget () override |
lldb::ProcessSP | CalculateProcess () override |
lldb::ThreadSP | CalculateThread () override |
lldb::StackFrameSP | CalculateStackFrame () override |
void | CalculateExecutionContext (ExecutionContext &exe_ctx) override |
Reconstruct the object's execution context into sc. | |
uint32_t | GetStopID () const |
void | SetStopID (uint32_t stop_id) |
Public Member Functions inherited from lldb_private::ExecutionContextScope | |
virtual | ~ExecutionContextScope ()=default |
virtual lldb::TargetSP | CalculateTarget ()=0 |
virtual lldb::ProcessSP | CalculateProcess ()=0 |
virtual lldb::ThreadSP | CalculateThread ()=0 |
virtual lldb::StackFrameSP | CalculateStackFrame ()=0 |
virtual void | CalculateExecutionContext (ExecutionContext &exe_ctx)=0 |
Reconstruct the object's execution context into sc. | |
Protected Member Functions | |
virtual bool | BehavesLikeZerothFrame () const |
Indicates that this frame is currently executing code, that the PC value is not a return-pc but an actual executing instruction. | |
Protected Attributes | |
Thread & | m_thread |
uint32_t | m_concrete_frame_idx |
uint32_t | m_stop_id |
Private Member Functions | |
RegisterContext (const RegisterContext &)=delete | |
const RegisterContext & | operator= (const RegisterContext &)=delete |
Definition at line 17 of file RegisterContext.h.
RegisterContext::RegisterContext | ( | Thread & | thread, |
uint32_t | concrete_frame_idx | ||
) |
Definition at line 26 of file RegisterContext.cpp.
|
overridedefault |
|
privatedelete |
|
inlineprotectedvirtual |
Indicates that this frame is currently executing code, that the PC value is not a return-pc but an actual executing instruction.
Some places in lldb will treat a return-pc value differently than the currently-executing-pc value, and this method can indicate if that should be done. The base class implementation only uses the frame index, but subclasses may have additional information that they can use to detect frames in this state, for instance a frame above a trap handler (sigtramp etc)..
Reimplemented in lldb_private::RegisterContextUnwind.
Definition at line 239 of file RegisterContext.h.
References m_concrete_frame_idx.
Referenced by GetPCForSymbolication().
|
overridevirtual |
Reconstruct the object's execution context into sc.
The object should fill in as much of the ExecutionContextScope as it can so function calls that require a execution context can be made for the given object.
[out] | exe_ctx | A reference to an execution context object that gets filled in. |
Implements lldb_private::ExecutionContextScope.
Definition at line 451 of file RegisterContext.cpp.
References lldb_private::Thread::CalculateExecutionContext(), and m_thread.
|
overridevirtual |
Implements lldb_private::ExecutionContextScope.
Definition at line 436 of file RegisterContext.cpp.
References lldb_private::Thread::CalculateProcess(), and m_thread.
Referenced by RegisterContextKDP_arm::DoReadDBG(), RegisterContextKDP_arm64::DoReadDBG(), RegisterContextKDP_arm::DoReadEXC(), RegisterContextKDP_arm64::DoReadEXC(), RegisterContextKDP_i386::DoReadEXC(), RegisterContextKDP_x86_64::DoReadEXC(), RegisterContextKDP_arm::DoReadFPU(), RegisterContextKDP_arm64::DoReadFPU(), RegisterContextKDP_i386::DoReadFPU(), RegisterContextKDP_x86_64::DoReadFPU(), RegisterContextKDP_arm::DoReadGPR(), RegisterContextKDP_arm64::DoReadGPR(), RegisterContextKDP_i386::DoReadGPR(), RegisterContextKDP_x86_64::DoReadGPR(), RegisterContextKDP_arm::DoWriteDBG(), RegisterContextKDP_arm64::DoWriteDBG(), RegisterContextKDP_arm::DoWriteEXC(), RegisterContextKDP_arm64::DoWriteEXC(), RegisterContextKDP_i386::DoWriteEXC(), RegisterContextKDP_x86_64::DoWriteEXC(), RegisterContextKDP_arm::DoWriteFPU(), RegisterContextKDP_arm64::DoWriteFPU(), RegisterContextKDP_i386::DoWriteFPU(), RegisterContextKDP_x86_64::DoWriteFPU(), RegisterContextKDP_arm::DoWriteGPR(), RegisterContextKDP_arm64::DoWriteGPR(), RegisterContextKDP_i386::DoWriteGPR(), RegisterContextKDP_x86_64::DoWriteGPR(), GetByteOrder(), RegisterContextMemory::ReadAllRegisterValues(), and RegisterContextMemory::WriteAllRegisterValues().
|
overridevirtual |
Implements lldb_private::ExecutionContextScope.
Definition at line 444 of file RegisterContext.cpp.
|
overridevirtual |
Implements lldb_private::ExecutionContextScope.
Definition at line 432 of file RegisterContext.cpp.
References lldb_private::Thread::CalculateTarget(), and m_thread.
Referenced by lldb_private::RegisterContextUnwind::GetStartPC().
|
overridevirtual |
Implements lldb_private::ExecutionContextScope.
Definition at line 440 of file RegisterContext.cpp.
References m_thread.
Referenced by lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReadAllRegisterValues(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReadRegisterBytes(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReconfigureRegisterInfo(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::RegisterWriteCausesReconfigure(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues(), and lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteRegisterBytes().
|
virtual |
Reimplemented in RegisterContextDarwin_arm, and lldb_private::RegisterContextThreadMemory.
Definition at line 289 of file RegisterContext.cpp.
|
virtual |
Reimplemented in RegisterContextDarwin_arm, RegisterContextDarwin_arm64, and lldb_private::RegisterContextThreadMemory.
Definition at line 298 of file RegisterContext.cpp.
bool RegisterContext::ConvertBetweenRegisterKinds | ( | lldb::RegisterKind | source_rk, |
uint32_t | source_regnum, | ||
lldb::RegisterKind | target_rk, | ||
uint32_t & | target_regnum | ||
) |
Definition at line 455 of file RegisterContext.cpp.
References GetRegisterCount(), GetRegisterInfoAtIndex(), lldb_private::RegisterInfo::kinds, and LLDB_INVALID_REGNUM.
|
virtual |
Convert from a given register numbering scheme to the lldb register numbering scheme.
There may be multiple ways to enumerate the registers for a given architecture. ABI references will specify one to be used with DWARF, the register numberings from process plugin, there may be a variation used for eh_frame unwind instructions (e.g. on Darwin), and so on. Register 5 by itself is meaningless - RegisterKind enumeration tells you what context that number should be translated as.
Inside lldb, register numbers are in the eRegisterKindLLDB scheme; arguments which take a register number should take one in that scheme.
eRegisterKindGeneric is a special numbering scheme which gives us constant values for the pc, frame register, stack register, etc., for use within lldb. They may not be defined for all architectures but it allows generic code to translate these common registers into the lldb numbering scheme.
This method translates a given register kind + register number into the eRegisterKindLLDB register numbering.
[in] | kind | The register numbering scheme (RegisterKind) that the following register number is in. |
[in] | num | A register number in the 'kind' register numbering scheme. |
Reimplemented in lldb_private::RegisterContextUnwind, lldb_private::process_gdb_remote::GDBRemoteRegisterContext, lldb_private::minidump::RegisterContextMinidump_ARM, lldb_private::minidump::RegisterContextMinidump_ARM64, RegisterContextDarwin_arm, RegisterContextDarwin_arm64, RegisterContextDarwin_i386, RegisterContextDarwin_x86_64, lldb_private::RegisterContextDummy, lldb_private::RegisterContextHistory, RegisterContextMemory, RegisterContextPOSIX_mips64, lldb_private::RegisterContextThreadMemory, and lldb_private::RegisterContextWindows.
Definition at line 274 of file RegisterContext.cpp.
References GetRegisterCount(), GetRegisterInfoAtIndex(), lldb_private::RegisterInfo::kinds, lldb::kNumRegisterKinds, and LLDB_INVALID_REGNUM.
Referenced by DumpRegister(), ABIMacOSX_arm64::GetArgumentValues(), ABIMacOSX_arm::GetArgumentValues(), GetFlags(), GetFP(), lldb_private::EmulateInstruction::GetInternalRegisterNumber(), GetPC(), GetRegisterInfo(), lldb_private::UnwindPlan::GetRegisterInfo(), GetReturnAddress(), GetSP(), GetThreadPointer(), LoadValueFromConsecutiveGPRRegisters(), ABIMacOSX_i386::PrepareTrivialCall(), ABIMacOSX_arm::PrepareTrivialCall(), ABISysV_arm::PrepareTrivialCall(), ABIMacOSX_arm64::PrepareTrivialCall(), ABISysV_i386::PrepareTrivialCall(), ReadRegisterValueAsScalar(), SetFP(), SetPC(), and SetSP().
bool RegisterContext::CopyFromRegisterContext | ( | lldb::RegisterContextSP | context | ) |
Definition at line 227 of file RegisterContext.cpp.
References lldb_private::Thread::GetRegisterContext(), GetRegisterInfoAtIndex(), GetRegisterSet(), GetRegisterSetCount(), GetThreadID(), m_thread, lldb_private::RegisterSet::num_registers, lldb_private::RegisterSet::registers, lldb_private::RegisterInfo::value_regs, and WriteRegister().
|
virtual |
Definition at line 411 of file RegisterContext.cpp.
References CalculateProcess(), lldb::eByteOrderInvalid, and lldb_private::Process::GetByteOrder().
Referenced by lldb_private::ArchitectureAArch64::ReconfigureRegisterInfo().
uint64_t RegisterContext::GetFlags | ( | uint64_t | fail_value = 0 | ) |
Definition at line 188 of file RegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FLAGS, and ReadRegisterAsUnsigned().
uint64_t RegisterContext::GetFP | ( | uint64_t | fail_value = LLDB_INVALID_ADDRESS | ) |
Definition at line 170 of file RegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FP, and ReadRegisterAsUnsigned().
Referenced by lldb_private::ThreadPlan::WillResume().
uint64_t RegisterContext::GetPC | ( | uint64_t | fail_value = LLDB_INVALID_ADDRESS | ) |
Definition at line 95 of file RegisterContext.cpp.
References lldb_private::Thread::CalculateTarget(), ConvertRegisterKindToRegisterNumber(), lldb_private::eCode, lldb::eRegisterKindGeneric, lldb_private::Target::GetOpcodeLoadAddress(), LLDB_REGNUM_GENERIC_PC, m_thread, pc, and ReadRegisterAsUnsigned().
Referenced by GetPCForSymbolication(), lldb_private::ThreadPlanAssemblyTracer::Log(), lldb_private::Process::RunThreadPlan(), and lldb_private::ThreadPlan::WillResume().
bool RegisterContext::GetPCForSymbolication | ( | Address & | address | ) |
Get an address suitable for symbolication.
When symbolicating – computing line, block, function – for a function in the middle of the stack, using the return address can lead to unexpected results for the user. A function that ends in a tail-call may have another function as the "return" address, but it will never actually return. Or a noreturn call in the middle of a function is the end of a block of instructions, and a DWARF location list entry for the return address may be a very different code path with incorrect results when printing variables for this frame.
At a source line view, the user expects the current-line indictation to point to the function call they're under, not the next source line.
The return address (GetPC()) should always be shown to the user, but when computing context, keeping within the bounds of the call instruction is what the user expects to see.
[out] | address | An Address object that will be filled in, if a PC can be retrieved. |
Definition at line 133 of file RegisterContext.cpp.
References BehavesLikeZerothFrame(), lldb_private::Thread::CalculateTarget(), GetPC(), LLDB_INVALID_ADDRESS, m_thread, pc, and lldb_private::Address::SetLoadAddress().
Referenced by lldb_private::DWARFExpressionList::Evaluate().
|
pure virtual |
Implemented in lldb_private::RegisterContextUnwind, lldb_private::process_gdb_remote::GDBRemoteRegisterContext, lldb_private::minidump::RegisterContextMinidump_ARM, lldb_private::minidump::RegisterContextMinidump_ARM64, RegisterContextDarwin_arm, RegisterContextDarwin_arm64, RegisterContextDarwin_i386, RegisterContextDarwin_x86_64, lldb_private::RegisterContextDummy, lldb_private::RegisterContextHistory, RegisterContextMemory, RegisterContextPOSIX_arm, RegisterContextPOSIX_arm64, RegisterContextPOSIX_loongarch64, RegisterContextPOSIX_mips64, RegisterContextPOSIX_powerpc, RegisterContextPOSIX_ppc64le, RegisterContextPOSIX_riscv64, RegisterContextPOSIX_s390x, RegisterContextPOSIX_x86, and lldb_private::RegisterContextThreadMemory.
Referenced by ConvertBetweenRegisterKinds(), ConvertRegisterKindToRegisterNumber(), lldb_private::RegisterContextWindows::ConvertRegisterKindToRegisterNumber(), GetRegisterInfoByName(), lldb_private::ThreadPlanAssemblyTracer::Log(), lldb_private::CommandCompletions::Registers(), and lldb_private::ThreadPlanCallFunction::ReportRegisterState().
const RegisterInfo * RegisterContext::GetRegisterInfo | ( | lldb::RegisterKind | reg_kind, |
uint32_t | reg_num | ||
) |
Definition at line 80 of file RegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), GetRegisterInfoAtIndex(), and LLDB_INVALID_REGNUM.
Referenced by lldb_private::DumpRegisterInfo(), ABISysV_arm64::GetArgumentValues(), ABISysV_arm::GetArgumentValues(), ABISysV_ppc::GetArgumentValues(), ABISysV_ppc64::GetArgumentValues(), ABISysV_s390x::GetArgumentValues(), ABISysV_x86_64::GetArgumentValues(), ABIWindows_x86_64::GetArgumentValues(), GetRegisterInfoByName(), ABISysV_arm64::GetReturnValueObjectImpl(), ABISysV_arm::GetReturnValueObjectImpl(), GetReturnValuePassedInMemory(), LoadValueFromConsecutiveGPRRegisters(), ABIMacOSX_arm::PrepareTrivialCall(), ABISysV_arm::PrepareTrivialCall(), ABIMacOSX_arm64::PrepareTrivialCall(), ABISysV_arm64::PrepareTrivialCall(), ABISysV_mips::PrepareTrivialCall(), ABISysV_mips64::PrepareTrivialCall(), ABISysV_ppc::PrepareTrivialCall(), ABISysV_ppc64::PrepareTrivialCall(), ABISysV_s390x::PrepareTrivialCall(), ABISysV_x86_64::PrepareTrivialCall(), ABIWindows_x86_64::PrepareTrivialCall(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReadRegister(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReadRegisterBytes(), ABISysV_arm64::SetReturnValueObject(), ABISysV_arm::SetReturnValueObject(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteRegister(), and lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteRegisterBytes().
|
pure virtual |
Implemented in lldb_private::RegisterContextUnwind, lldb_private::process_gdb_remote::GDBRemoteRegisterContext, lldb_private::minidump::RegisterContextMinidump_ARM, lldb_private::minidump::RegisterContextMinidump_ARM64, RegisterContextDarwin_arm, RegisterContextDarwin_arm64, RegisterContextDarwin_i386, RegisterContextDarwin_x86_64, lldb_private::RegisterContextDummy, lldb_private::RegisterContextHistory, RegisterContextMemory, RegisterContextPOSIX_arm, RegisterContextPOSIX_arm64, RegisterContextPOSIX_loongarch64, RegisterContextPOSIX_mips64, RegisterContextPOSIX_powerpc, RegisterContextPOSIX_ppc64le, RegisterContextPOSIX_riscv64, RegisterContextPOSIX_s390x, RegisterContextPOSIX_x86, and lldb_private::RegisterContextThreadMemory.
Referenced by ConvertBetweenRegisterKinds(), ConvertRegisterKindToRegisterNumber(), lldb_private::RegisterContextWindows::ConvertRegisterKindToRegisterNumber(), CopyFromRegisterContext(), DumpRegister(), lldb_private::DumpRegisterInfo(), CommandObjectRegisterRead::DumpRegisterSet(), ABIMacOSX_arm64::GetArgumentValues(), ABIMacOSX_arm::GetArgumentValues(), GetRegisterInfo(), lldb_private::UnwindPlan::GetRegisterInfo(), GetRegisterInfoByName(), GetRegisterName(), ABISysV_hexagon::GetReturnValueObjectImpl(), LoadValueFromConsecutiveGPRRegisters(), lldb_private::ThreadPlanAssemblyTracer::Log(), ABIMacOSX_arm64::PrepareTrivialCall(), ABISysV_ppc64::PrepareTrivialCall(), ReadRegisterAsUnsigned(), ReadRegisterValueAsScalar(), lldb_private::CommandCompletions::Registers(), lldb_private::ThreadPlanCallFunction::ReportRegisterState(), and WriteRegisterFromUnsigned().
const RegisterInfo * RegisterContext::GetRegisterInfoByName | ( | llvm::StringRef | reg_name, |
uint32_t | start_idx = 0 |
||
) |
Definition at line 52 of file RegisterContext.cpp.
References lldb_private::RegisterInfo::alt_name, lldb::eRegisterKindGeneric, GetRegisterCount(), GetRegisterInfo(), GetRegisterInfoAtIndex(), LLDB_INVALID_REGNUM, lldb_private::RegisterInfo::name, and lldb_private::Args::StringToGenericRegister().
Referenced by lldb_private::StopInfoMachException::DeterminePtrauthFailure(), CommandObjectRegisterRead::DoExecute(), CommandObjectRegisterWrite::DoExecute(), CommandObjectRegisterInfo::DoExecute(), DumpRegister(), ABIMacOSX_arm64::GetArgumentValues(), ABIMacOSX_arm::GetArgumentValues(), ABIMacOSX_arm64::GetReturnValueObjectImpl(), ABISysV_arm64::GetReturnValueObjectImpl(), ABIMacOSX_arm::GetReturnValueObjectImpl(), ABISysV_arm::GetReturnValueObjectImpl(), ABIMacOSX_i386::GetReturnValueObjectImpl(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_ppc::GetReturnValueObjectSimple(), ABISysV_s390x::GetReturnValueObjectSimple(), ABISysV_i386::GetReturnValueObjectSimple(), ABISysV_x86_64::GetReturnValueObjectSimple(), ABIWindows_x86_64::GetReturnValueObjectSimple(), ABISysV_arc::IsRegisterFileReduced(), LoadValueFromConsecutiveGPRRegisters(), ABIMacOSX_i386::PrepareTrivialCall(), ABIMacOSX_arm::PrepareTrivialCall(), ABISysV_mips::PrepareTrivialCall(), ABISysV_mips64::PrepareTrivialCall(), ABISysV_s390x::PrepareTrivialCall(), ABISysV_i386::PrepareTrivialCall(), read_register_u128(), read_register_u16_raw(), read_register_u32_raw(), read_register_u64_raw(), ABIMacOSX_arm64::SetReturnValueObject(), ABISysV_arm64::SetReturnValueObject(), ABIMacOSX_arm::SetReturnValueObject(), ABISysV_mips::SetReturnValueObject(), ABISysV_mips64::SetReturnValueObject(), ABISysV_ppc::SetReturnValueObject(), ABISysV_ppc64::SetReturnValueObject(), ABISysV_s390x::SetReturnValueObject(), ABIMacOSX_i386::SetReturnValueObject(), ABISysV_i386::SetReturnValueObject(), ABISysV_x86_64::SetReturnValueObject(), and ABIWindows_x86_64::SetReturnValueObject().
const char * RegisterContext::GetRegisterName | ( | uint32_t | reg | ) |
Definition at line 88 of file RegisterContext.cpp.
References GetRegisterInfoAtIndex(), and lldb_private::RegisterInfo::name.
|
pure virtual |
Implemented in lldb_private::RegisterContextUnwind, lldb_private::process_gdb_remote::GDBRemoteRegisterContext, lldb_private::RegisterContextDummy, lldb_private::RegisterContextHistory, RegisterContextMemory, lldb_private::RegisterContextThreadMemory, RegisterContextLinuxCore_x86_64, lldb_private::minidump::RegisterContextMinidump_ARM, lldb_private::minidump::RegisterContextMinidump_ARM64, RegisterContextDarwin_arm, RegisterContextDarwin_arm64, RegisterContextDarwin_i386, RegisterContextDarwin_x86_64, RegisterContextPOSIX_arm, RegisterContextPOSIX_arm64, RegisterContextPOSIX_loongarch64, RegisterContextPOSIX_mips64, RegisterContextPOSIX_powerpc, RegisterContextPOSIX_ppc64le, RegisterContextPOSIX_riscv64, RegisterContextPOSIX_s390x, and RegisterContextPOSIX_x86.
Referenced by CopyFromRegisterContext(), lldb_private::DumpRegisterInfo(), and CommandObjectRegisterRead::DumpRegisterSet().
|
pure virtual |
Implemented in lldb_private::RegisterContextUnwind, lldb_private::process_gdb_remote::GDBRemoteRegisterContext, lldb_private::minidump::RegisterContextMinidump_ARM, lldb_private::minidump::RegisterContextMinidump_ARM64, RegisterContextDarwin_arm, RegisterContextDarwin_arm64, RegisterContextDarwin_i386, RegisterContextDarwin_x86_64, lldb_private::RegisterContextDummy, lldb_private::RegisterContextHistory, RegisterContextMemory, RegisterContextPOSIX_arm, RegisterContextPOSIX_arm64, RegisterContextPOSIX_loongarch64, RegisterContextPOSIX_mips64, RegisterContextPOSIX_powerpc, RegisterContextPOSIX_ppc64le, RegisterContextPOSIX_riscv64, RegisterContextPOSIX_s390x, RegisterContextPOSIX_x86, and lldb_private::RegisterContextThreadMemory.
Referenced by CopyFromRegisterContext(), CommandObjectRegisterRead::DoExecute(), and lldb_private::DumpRegisterInfo().
uint64_t RegisterContext::GetReturnAddress | ( | uint64_t | fail_value = LLDB_INVALID_ADDRESS | ) |
Definition at line 182 of file RegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA, and ReadRegisterAsUnsigned().
uint64_t RegisterContext::GetSP | ( | uint64_t | fail_value = LLDB_INVALID_ADDRESS | ) |
Definition at line 158 of file RegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP, and ReadRegisterAsUnsigned().
Referenced by MinidumpFileBuilder::AddThreadList(), ABIMacOSX_arm64::GetArgumentValues(), ABISysV_arm64::GetArgumentValues(), ABIMacOSX_arm::GetArgumentValues(), ABISysV_arm::GetArgumentValues(), ABISysV_ppc::GetArgumentValues(), ABISysV_ppc64::GetArgumentValues(), ABISysV_s390x::GetArgumentValues(), ABIMacOSX_i386::GetArgumentValues(), ABISysV_i386::GetArgumentValues(), ABISysV_x86_64::GetArgumentValues(), ABIWindows_x86_64::GetArgumentValues(), and lldb_private::ThreadPlan::WillResume().
|
inline |
Definition at line 225 of file RegisterContext.h.
References m_stop_id.
Referenced by InvalidateIfNeeded().
|
inlinevirtual |
Definition at line 143 of file RegisterContext.h.
References m_thread.
|
virtual |
Definition at line 262 of file RegisterContext.cpp.
References lldb_private::UserID::GetID(), and m_thread.
Referenced by CopyFromRegisterContext(), RegisterContextDarwin_arm::ReadDBG(), RegisterContextDarwin_arm64::ReadDBG(), RegisterContextDarwin_arm::ReadEXC(), RegisterContextDarwin_arm64::ReadEXC(), RegisterContextDarwin_i386::ReadEXC(), RegisterContextDarwin_x86_64::ReadEXC(), RegisterContextDarwin_arm::ReadFPU(), RegisterContextDarwin_arm64::ReadFPU(), RegisterContextDarwin_i386::ReadFPU(), RegisterContextDarwin_x86_64::ReadFPU(), RegisterContextDarwin_arm::ReadGPR(), RegisterContextDarwin_arm64::ReadGPR(), RegisterContextDarwin_i386::ReadGPR(), RegisterContextDarwin_x86_64::ReadGPR(), RegisterContextDarwin_arm::WriteDBG(), RegisterContextDarwin_arm64::WriteDBG(), RegisterContextDarwin_arm::WriteEXC(), RegisterContextDarwin_arm64::WriteEXC(), RegisterContextDarwin_i386::WriteEXC(), RegisterContextDarwin_x86_64::WriteEXC(), RegisterContextDarwin_arm::WriteFPU(), RegisterContextDarwin_arm64::WriteFPU(), RegisterContextDarwin_i386::WriteFPU(), RegisterContextDarwin_x86_64::WriteFPU(), RegisterContextDarwin_arm::WriteGPR(), RegisterContextDarwin_arm64::WriteGPR(), RegisterContextDarwin_i386::WriteGPR(), and RegisterContextDarwin_x86_64::WriteGPR().
uint64_t RegisterContext::GetThreadPointer | ( | uint64_t | fail_value = LLDB_INVALID_ADDRESS | ) |
Definition at line 112 of file RegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, LLDB_REGNUM_GENERIC_TP, and ReadRegisterAsUnsigned().
|
virtual |
Reimplemented in RegisterContextCorePOSIX_arm, RegisterContextCorePOSIX_arm64, RegisterContextCorePOSIX_mips64, RegisterContextCorePOSIX_powerpc, RegisterContextCorePOSIX_s390x, RegisterContextCorePOSIX_x86_64, RegisterContextDarwin_i386, RegisterContextDarwin_x86_64, lldb_private::RegisterContextThreadMemory, and lldb_private::RegisterContextWindows.
Definition at line 302 of file RegisterContext.cpp.
|
pure virtual |
Implemented in lldb_private::RegisterContextUnwind, RegisterContextDarwin_x86_64_Mach, RegisterContextDarwin_i386_Mach, RegisterContextDarwin_arm_Mach, RegisterContextDarwin_arm64_Mach, lldb_private::process_gdb_remote::GDBRemoteRegisterContext, lldb_private::minidump::RegisterContextMinidump_ARM, lldb_private::minidump::RegisterContextMinidump_ARM64, RegisterContextDarwin_arm, RegisterContextDarwin_arm64, RegisterContextDarwin_i386, RegisterContextDarwin_x86_64, lldb_private::RegisterContextDummy, lldb_private::RegisterContextHistory, RegisterContextMemory, RegisterContextPOSIX_arm, RegisterContextPOSIX_arm64, RegisterContextPOSIX_loongarch64, RegisterContextPOSIX_mips64, RegisterContextPOSIX_powerpc, RegisterContextPOSIX_ppc64le, RegisterContextPOSIX_riscv64, RegisterContextPOSIX_s390x, RegisterContextPOSIX_x86, lldb_private::RegisterContextThreadMemory, and lldb_private::RegisterContextWindows.
Referenced by InvalidateIfNeeded().
void RegisterContext::InvalidateIfNeeded | ( | bool | force | ) |
Definition at line 32 of file RegisterContext.cpp.
References lldb_private::Thread::GetProcess(), GetStopID(), InvalidateAllRegisters(), m_thread, SetStopID(), and UINT32_MAX.
Referenced by lldb_private::process_gdb_remote::GDBRemoteRegisterContext::PrivateSetRegisterValue(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReadRegisterBytes(), and lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteRegisterBytes().
|
virtual |
Reimplemented in RegisterContextDarwin_arm, and lldb_private::RegisterContextThreadMemory.
Definition at line 264 of file RegisterContext.cpp.
|
virtual |
Reimplemented in RegisterContextDarwin_arm, RegisterContextDarwin_arm64, and lldb_private::RegisterContextThreadMemory.
Definition at line 291 of file RegisterContext.cpp.
|
privatedelete |
|
inlinevirtual |
Reimplemented in lldb_private::RegisterContextUnwind, RegisterContextCorePOSIX_arm, RegisterContextCorePOSIX_arm64, RegisterContextCorePOSIX_mips64, RegisterContextCorePOSIX_powerpc, RegisterContextCorePOSIX_s390x, RegisterContextCorePOSIX_x86_64, lldb_private::process_gdb_remote::GDBRemoteRegisterContext, RegisterContextDarwin_arm, RegisterContextDarwin_arm64, RegisterContextDarwin_i386, RegisterContextDarwin_x86_64, lldb_private::RegisterContextDummy, lldb_private::RegisterContextHistory, RegisterContextMemory, lldb_private::RegisterContextThreadMemory, and lldb_private::RegisterContextWindows.
Definition at line 46 of file RegisterContext.h.
Referenced by ReadAllRegisterValues().
|
virtual |
Reimplemented in lldb_private::process_gdb_remote::GDBRemoteRegisterContext.
Definition at line 422 of file RegisterContext.cpp.
References lldb_private::RegisterCheckpoint::GetData(), and ReadAllRegisterValues().
|
pure virtual |
Implemented in RegisterContextDarwin_arm, RegisterContextDarwin_arm64, RegisterContextMemory, lldb_private::RegisterContextUnwind, RegisterContextCorePOSIX_arm, RegisterContextCorePOSIX_arm64, RegisterContextCorePOSIX_mips64, RegisterContextCorePOSIX_powerpc, RegisterContextCorePOSIX_ppc64le, RegisterContextCorePOSIX_riscv64, RegisterContextCorePOSIX_s390x, RegisterContextCorePOSIX_x86_64, RegisterContextFreeBSDKernel_arm64, RegisterContextFreeBSDKernel_i386, RegisterContextFreeBSDKernel_x86_64, RegisterContextDarwin_i386, RegisterContextDarwin_x86_64, lldb_private::RegisterContextDummy, lldb_private::RegisterContextHistory, lldb_private::minidump::RegisterContextMinidump_ARM, lldb_private::minidump::RegisterContextMinidump_ARM64, lldb_private::RegisterContextThreadMemory, and lldb_private::process_gdb_remote::GDBRemoteRegisterContext.
Referenced by lldb_private::StopInfoMachException::DeterminePtrauthFailure(), CommandObjectRegisterRead::DumpRegister(), DumpRegister(), ABIMacOSX_arm64::GetArgumentValues(), ABISysV_arm64::GetArgumentValues(), ABIMacOSX_arm::GetArgumentValues(), ABISysV_arm::GetArgumentValues(), ABIMacOSX_arm64::GetReturnValueObjectImpl(), ABISysV_arm64::GetReturnValueObjectImpl(), ABIMacOSX_arm::GetReturnValueObjectImpl(), ABISysV_arm::GetReturnValueObjectImpl(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_hexagon::GetReturnValueObjectImpl(), ABISysV_ppc::GetReturnValueObjectSimple(), ABISysV_s390x::GetReturnValueObjectSimple(), ABISysV_i386::GetReturnValueObjectSimple(), ABISysV_x86_64::GetReturnValueObjectSimple(), ABIWindows_x86_64::GetReturnValueObjectSimple(), LoadValueFromConsecutiveGPRRegisters(), lldb_private::ThreadPlanAssemblyTracer::Log(), read_register_u128(), read_register_u16_raw(), read_register_u32_raw(), read_register_u64_raw(), ReadRegisterAsUnsigned(), ReadRegisterValueAsScalar(), and lldb_private::ThreadPlanCallFunction::ReportRegisterState().
uint64_t RegisterContext::ReadRegisterAsUnsigned | ( | const RegisterInfo * | reg_info, |
uint64_t | fail_value | ||
) |
Definition at line 201 of file RegisterContext.cpp.
References lldb_private::RegisterValue::GetAsUInt64(), and ReadRegister().
uint64_t RegisterContext::ReadRegisterAsUnsigned | ( | uint32_t | reg, |
uint64_t | fail_value | ||
) |
Definition at line 194 of file RegisterContext.cpp.
References GetRegisterInfoAtIndex(), LLDB_INVALID_REGNUM, and ReadRegisterAsUnsigned().
Referenced by GetFlags(), GetFP(), GetPC(), GetReturnAddress(), ABIMacOSX_arm::GetReturnValueObjectImpl(), ABISysV_arm::GetReturnValueObjectImpl(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), GetReturnValuePassedInMemory(), GetSP(), GetThreadPointer(), ABISysV_arc::IsRegisterFileReduced(), LoadValueFromConsecutiveGPRRegisters(), ABIMacOSX_arm::PrepareTrivialCall(), ABISysV_arm::PrepareTrivialCall(), ABISysV_ppc64::PrepareTrivialCall(), ReadRegisterAsUnsigned(), and lldb_private::ArchitectureAArch64::ReconfigureRegisterInfo().
|
virtual |
Reimplemented in lldb_private::RegisterContextThreadMemory.
Definition at line 304 of file RegisterContext.cpp.
References lldb_private::RegisterInfo::byte_size, lldb_private::RegisterInfo::data(), error(), lldb_private::Thread::GetProcess(), m_thread, lldb_private::RegisterInfo::name, and lldb_private::RegisterValue::SetFromMemoryData().
Referenced by lldb_private::RegisterContextUnwind::ReadFrameAddress(), and lldb_private::RegisterContextUnwind::ReadRegisterValueFromRegisterLocation().
|
inlinevirtual |
Reimplemented in lldb_private::process_gdb_remote::GDBRemoteRegisterContext.
Definition at line 58 of file RegisterContext.h.
|
inlinevirtual |
Reimplemented in lldb_private::process_gdb_remote::GDBRemoteRegisterContext.
Definition at line 54 of file RegisterContext.h.
bool RegisterContext::SetFP | ( | uint64_t | fp | ) |
Definition at line 176 of file RegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, fp, LLDB_REGNUM_GENERIC_FP, and WriteRegisterFromUnsigned().
|
virtual |
Reimplemented in RegisterContextDarwin_arm, and lldb_private::RegisterContextThreadMemory.
Definition at line 266 of file RegisterContext.cpp.
References LLDB_INVALID_INDEX32.
|
virtual |
Reimplemented in RegisterContextDarwin_arm, RegisterContextDarwin_arm64, and lldb_private::RegisterContextThreadMemory.
Definition at line 293 of file RegisterContext.cpp.
References LLDB_INVALID_INDEX32.
bool RegisterContext::SetPC | ( | Address | addr | ) |
Definition at line 147 of file RegisterContext.cpp.
References lldb_private::Thread::CalculateTarget(), lldb_private::Address::GetCallableLoadAddress(), LLDB_INVALID_ADDRESS, m_thread, and SetPC().
bool RegisterContext::SetPC | ( | uint64_t | pc | ) |
Definition at line 118 of file RegisterContext.cpp.
References lldb_private::Thread::ClearStackFrames(), ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, lldb_private::Thread::GetFrameWithConcreteFrameIndex(), LLDB_REGNUM_GENERIC_PC, m_concrete_frame_idx, m_thread, pc, and WriteRegisterFromUnsigned().
Referenced by CommandObjectThreadJump::DoExecute(), lldb_private::Thread::JumpToLine(), and SetPC().
bool RegisterContext::SetSP | ( | uint64_t | sp | ) |
Definition at line 164 of file RegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP, sp, and WriteRegisterFromUnsigned().
|
inline |
Definition at line 227 of file RegisterContext.h.
References m_stop_id.
Referenced by InvalidateIfNeeded().
|
inlinevirtual |
Reimplemented in lldb_private::RegisterContextUnwind, RegisterContextCorePOSIX_arm, RegisterContextCorePOSIX_arm64, RegisterContextCorePOSIX_mips64, RegisterContextCorePOSIX_powerpc, RegisterContextCorePOSIX_s390x, RegisterContextCorePOSIX_x86_64, lldb_private::process_gdb_remote::GDBRemoteRegisterContext, RegisterContextDarwin_arm, RegisterContextDarwin_arm64, RegisterContextDarwin_i386, RegisterContextDarwin_x86_64, lldb_private::RegisterContextDummy, lldb_private::RegisterContextHistory, RegisterContextMemory, lldb_private::RegisterContextThreadMemory, and lldb_private::RegisterContextWindows.
Definition at line 50 of file RegisterContext.h.
Referenced by WriteAllRegisterValues().
|
virtual |
Reimplemented in lldb_private::process_gdb_remote::GDBRemoteRegisterContext.
Definition at line 427 of file RegisterContext.cpp.
References lldb_private::RegisterCheckpoint::GetData(), and WriteAllRegisterValues().
|
pure virtual |
Implemented in RegisterContextDarwin_arm, RegisterContextDarwin_arm64, RegisterContextMemory, lldb_private::RegisterContextUnwind, RegisterContextCorePOSIX_arm, RegisterContextCorePOSIX_arm64, RegisterContextCorePOSIX_mips64, RegisterContextCorePOSIX_powerpc, RegisterContextCorePOSIX_ppc64le, RegisterContextCorePOSIX_riscv64, RegisterContextCorePOSIX_s390x, RegisterContextCorePOSIX_x86_64, RegisterContextFreeBSDKernel_arm64, RegisterContextFreeBSDKernel_i386, RegisterContextFreeBSDKernel_x86_64, RegisterContextDarwin_i386, RegisterContextDarwin_x86_64, lldb_private::RegisterContextDummy, lldb_private::RegisterContextHistory, lldb_private::minidump::RegisterContextMinidump_ARM, lldb_private::minidump::RegisterContextMinidump_ARM64, lldb_private::RegisterContextThreadMemory, and lldb_private::process_gdb_remote::GDBRemoteRegisterContext.
Referenced by CopyFromRegisterContext(), CommandObjectRegisterWrite::DoExecute(), ABIMacOSX_arm::PrepareTrivialCall(), ABISysV_arm::PrepareTrivialCall(), lldb_private::ValueObjectVariable::SetData(), ABIMacOSX_arm64::SetReturnValueObject(), ABISysV_arm64::SetReturnValueObject(), ABISysV_s390x::SetReturnValueObject(), ABISysV_i386::SetReturnValueObject(), ABISysV_x86_64::SetReturnValueObject(), ABIWindows_x86_64::SetReturnValueObject(), lldb_private::ValueObjectVariable::SetValueFromCString(), and WriteRegisterFromUnsigned().
bool RegisterContext::WriteRegisterFromUnsigned | ( | const RegisterInfo * | reg_info, |
uint64_t | uval | ||
) |
Definition at line 217 of file RegisterContext.cpp.
References lldb_private::RegisterInfo::byte_size, lldb_private::RegisterValue::SetUInt(), and WriteRegister().
bool RegisterContext::WriteRegisterFromUnsigned | ( | uint32_t | reg, |
uint64_t | uval | ||
) |
Definition at line 211 of file RegisterContext.cpp.
References GetRegisterInfoAtIndex(), LLDB_INVALID_REGNUM, and WriteRegisterFromUnsigned().
Referenced by ABIMacOSX_i386::PrepareTrivialCall(), ABIMacOSX_arm::PrepareTrivialCall(), ABISysV_arm::PrepareTrivialCall(), ABIMacOSX_arm64::PrepareTrivialCall(), ABISysV_arm64::PrepareTrivialCall(), ABISysV_mips::PrepareTrivialCall(), ABISysV_mips64::PrepareTrivialCall(), ABISysV_ppc::PrepareTrivialCall(), ABISysV_ppc64::PrepareTrivialCall(), ABISysV_s390x::PrepareTrivialCall(), ABISysV_i386::PrepareTrivialCall(), ABISysV_x86_64::PrepareTrivialCall(), ABIWindows_x86_64::PrepareTrivialCall(), SetFP(), SetPC(), ABIMacOSX_arm64::SetReturnValueObject(), ABISysV_arm64::SetReturnValueObject(), ABIMacOSX_arm::SetReturnValueObject(), ABISysV_arm::SetReturnValueObject(), ABISysV_mips::SetReturnValueObject(), ABISysV_mips64::SetReturnValueObject(), ABISysV_ppc::SetReturnValueObject(), ABISysV_ppc64::SetReturnValueObject(), ABISysV_s390x::SetReturnValueObject(), ABIMacOSX_i386::SetReturnValueObject(), ABISysV_i386::SetReturnValueObject(), ABISysV_x86_64::SetReturnValueObject(), ABIWindows_x86_64::SetReturnValueObject(), SetSP(), and WriteRegisterFromUnsigned().
|
virtual |
Reimplemented in lldb_private::RegisterContextThreadMemory.
Definition at line 369 of file RegisterContext.cpp.
References lldb_private::RegisterInfo::data(), error(), lldb_private::RegisterValue::GetAsMemoryData(), lldb_private::Thread::GetProcess(), and m_thread.
Referenced by ABIMacOSX_i386::PrepareTrivialCall(), ABISysV_i386::PrepareTrivialCall(), RegisterContextMemory::WriteRegister(), and lldb_private::RegisterContextUnwind::WriteRegisterValueToRegisterLocation().
|
protected |
Definition at line 245 of file RegisterContext.h.
Referenced by BehavesLikeZerothFrame(), and SetPC().
|
protected |
Definition at line 247 of file RegisterContext.h.
Referenced by GetStopID(), and SetStopID().
|
protected |
Definition at line 244 of file RegisterContext.h.
Referenced by lldb_private::RegisterContextWindows::ApplyAllRegisterValues(), lldb_private::RegisterContextWindows::CacheAllRegisterValues(), CalculateExecutionContext(), CalculateProcess(), CalculateTarget(), CalculateThread(), CopyFromRegisterContext(), GetPC(), GetPCForSymbolication(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::GetPrimordialRegister(), GetThread(), GetThreadID(), InvalidateIfNeeded(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReadAllRegisterValues(), RegisterContextDarwin_arm64::ReadRegister(), RegisterContextFreeBSDKernel_arm64::ReadRegister(), RegisterContextFreeBSDKernel_i386::ReadRegister(), RegisterContextFreeBSDKernel_x86_64::ReadRegister(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReadRegisterBytes(), ReadRegisterValueFromMemory(), SetPC(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::SetPrimordialRegister(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteRegisterBytes(), and WriteRegisterValueToMemory().