LLDB mainline
|
#include <NativeRegisterContext.h>
Protected Attributes | |
NativeThreadProtocol & | m_thread |
Private Member Functions | |
NativeRegisterContext (const NativeRegisterContext &)=delete | |
const NativeRegisterContext & | operator= (const NativeRegisterContext &)=delete |
Definition at line 21 of file NativeRegisterContext.h.
NativeRegisterContext::NativeRegisterContext | ( | NativeThreadProtocol & | thread | ) |
Definition at line 20 of file NativeRegisterContext.cpp.
|
virtualdefault |
|
privatedelete |
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64.
Definition at line 248 of file NativeRegisterContext.cpp.
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64, and lldb_private::NativeRegisterContextDBReg_x86.
Definition at line 278 of file NativeRegisterContext.cpp.
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64.
Definition at line 252 of file NativeRegisterContext.cpp.
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64, and lldb_private::NativeRegisterContextDBReg_x86.
Definition at line 270 of file NativeRegisterContext.cpp.
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_x86.
Definition at line 274 of file NativeRegisterContext.cpp.
uint32_t NativeRegisterContext::ConvertRegisterKindToRegisterNumber | ( | uint32_t | kind, |
uint32_t | num | ||
) | const |
Definition at line 416 of file NativeRegisterContext.cpp.
References GetRegisterCount(), GetRegisterInfoAtIndex(), lldb_private::RegisterInfo::kinds, lldb::kNumRegisterKinds, and LLDB_INVALID_REGNUM.
Referenced by lldb_private::NativeThreadWindows::DoResume(), GetExpeditedRegisters(), GetFlags(), GetFP(), GetPC(), GetRegisterInfo(), GetReturnAddress(), GetSP(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::PrepareStopReplyPacketForThread(), SetFP(), SetPC(), and SetSP().
|
virtual |
Definition at line 432 of file NativeRegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, lldb_private::Full, GetRegisterSet(), GetRegisterSetCount(), LLDB_INVALID_REGNUM, LLDB_REGNUM_GENERIC_FP, LLDB_REGNUM_GENERIC_PC, LLDB_REGNUM_GENERIC_RA, LLDB_REGNUM_GENERIC_SP, and lldb_private::Minimal.
Referenced by GetRegistersAsJSON(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::PrepareStopReplyPacketForThread().
lldb::addr_t NativeRegisterContext::GetFlags | ( | lldb::addr_t | fail_value = 0 | ) |
Definition at line 179 of file NativeRegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FLAGS, and ReadRegisterAsUnsigned().
lldb::addr_t NativeRegisterContext::GetFP | ( | lldb::addr_t | fail_value = LLDB_INVALID_ADDRESS | ) |
Definition at line 161 of file NativeRegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FP, and ReadRegisterAsUnsigned().
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64.
Definition at line 256 of file NativeRegisterContext.cpp.
References LLDB_INVALID_INDEX32.
Referenced by lldb_private::process_linux::NativeProcessLinux::MonitorSIGTRAP().
lldb::addr_t NativeRegisterContext::GetPC | ( | lldb::addr_t | fail_value = LLDB_INVALID_ADDRESS | ) |
Definition at line 123 of file NativeRegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, lldb_private::GetLog(), LLDB_LOGF, LLDB_REGNUM_GENERIC_PC, ReadRegisterAsUnsigned(), and lldb_private::Thread.
Referenced by GetPCfromBreakpointLocation(), and lldb_private::NativeProcessSoftwareSingleStep::SetupSoftwareSingleStepping().
|
virtual |
Definition at line 139 of file NativeRegisterContext.cpp.
References GetPC().
Referenced by lldb_private::NativeProcessProtocol::FixupBreakpointPCAsNeeded().
|
pure virtual |
Implemented in lldb_private::NativeRegisterContextRegisterInfo.
Referenced by ConvertRegisterKindToRegisterNumber(), and GetRegisterInfoByName().
const RegisterInfo * NativeRegisterContext::GetRegisterInfo | ( | uint32_t | reg_kind, |
uint32_t | reg_num | ||
) |
Definition at line 81 of file NativeRegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), GetRegisterInfoAtIndex(), and LLDB_INVALID_REGNUM.
Referenced by GetRegisterInfoByName(), ReadFlags(), and lldb_private::NativeProcessSoftwareSingleStep::SetupSoftwareSingleStepping().
|
pure virtual |
Implemented in lldb_private::NativeRegisterContextRegisterInfo.
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::BuildTargetXml(), ConvertRegisterKindToRegisterNumber(), GetRegisterInfo(), GetRegisterInfoByName(), GetRegisterName(), GetRegistersAsJSON(), GetRegisterSetNameForRegisterAtIndex(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_g(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_p(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_P(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qRegisterInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::PrepareStopReplyPacketForThread(), ReadRegisterAsUnsigned(), and WriteRegisterFromUnsigned().
const RegisterInfo * NativeRegisterContext::GetRegisterInfoByName | ( | llvm::StringRef | reg_name, |
uint32_t | start_idx = 0 |
||
) |
Definition at line 53 of file NativeRegisterContext.cpp.
References lldb_private::RegisterInfo::alt_name, lldb::eRegisterKindGeneric, GetRegisterCount(), GetRegisterInfo(), GetRegisterInfoAtIndex(), LLDB_INVALID_REGNUM, lldb_private::RegisterInfo::name, and lldb_private::Args::StringToGenericRegister().
const char * NativeRegisterContext::GetRegisterName | ( | uint32_t | reg | ) |
Definition at line 89 of file NativeRegisterContext.cpp.
References GetRegisterInfoAtIndex(), and lldb_private::RegisterInfo::name.
|
pure virtual |
Referenced by GetExpeditedRegisters(), and GetRegisterSetNameForRegisterAtIndex().
|
pure virtual |
Referenced by GetExpeditedRegisters(), and GetRegisterSetNameForRegisterAtIndex().
const char * NativeRegisterContext::GetRegisterSetNameForRegisterAtIndex | ( | uint32_t | reg_index | ) | const |
Definition at line 96 of file NativeRegisterContext.cpp.
References GetRegisterInfoAtIndex(), GetRegisterSet(), GetRegisterSetCount(), lldb_private::RegisterInfo::kinds, lldb_private::RegisterSet::name, lldb_private::RegisterSet::num_registers, and lldb_private::RegisterSet::registers.
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::BuildTargetXml(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qRegisterInfo().
lldb::addr_t NativeRegisterContext::GetReturnAddress | ( | lldb::addr_t | fail_value = LLDB_INVALID_ADDRESS | ) |
Definition at line 173 of file NativeRegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA, and ReadRegisterAsUnsigned().
lldb::addr_t NativeRegisterContext::GetSP | ( | lldb::addr_t | fail_value = LLDB_INVALID_ADDRESS | ) |
Definition at line 149 of file NativeRegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP, and ReadRegisterAsUnsigned().
|
inlinevirtual |
Definition at line 119 of file NativeRegisterContext.h.
References m_thread.
|
virtual |
Definition at line 237 of file NativeRegisterContext.cpp.
References lldb_private::NativeThreadProtocol::GetID(), and m_thread.
|
pure virtual |
Implemented in lldb_private::NativeRegisterContextRegisterInfo.
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::BuildTargetXml(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_g(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_p(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_P(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qRegisterInfo().
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64, and lldb_private::NativeRegisterContextDBReg_x86.
Definition at line 299 of file NativeRegisterContext.cpp.
References LLDB_INVALID_ADDRESS.
Referenced by lldb_private::NativeProcessWindows::OnDebugException(), lldb_private::process_freebsd::NativeThreadFreeBSD::SetStoppedByWatchpoint(), and lldb_private::process_netbsd::NativeThreadNetBSD::SetStoppedByWatchpoint().
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64.
Definition at line 303 of file NativeRegisterContext.cpp.
References LLDB_INVALID_ADDRESS.
Referenced by lldb_private::NativeProcessWindows::OnDebugException(), lldb_private::process_freebsd::NativeThreadFreeBSD::SetStoppedByWatchpoint(), and lldb_private::process_netbsd::NativeThreadNetBSD::SetStoppedByWatchpoint().
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64, and lldb_private::NativeRegisterContextDBReg_x86.
Definition at line 287 of file NativeRegisterContext.cpp.
References LLDB_INVALID_INDEX32.
Referenced by lldb_private::process_linux::NativeProcessLinux::MonitorSIGTRAP(), and lldb_private::NativeProcessWindows::OnDebugException().
|
virtual |
Definition at line 307 of file NativeRegisterContext.cpp.
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_x86.
Definition at line 282 of file NativeRegisterContext.cpp.
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_x86.
Definition at line 293 of file NativeRegisterContext.cpp.
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64.
Definition at line 241 of file NativeRegisterContext.cpp.
Referenced by lldb_private::NativeProcessProtocol::GetHardwareDebugSupportInfo().
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64, and lldb_private::NativeRegisterContextDBReg_x86.
Definition at line 262 of file NativeRegisterContext.cpp.
Referenced by lldb_private::NativeProcessProtocol::GetHardwareDebugSupportInfo().
|
privatedelete |
|
pure virtual |
|
pure virtual |
Referenced by lldb_private::NativeRegisterContextDBReg_x86::ClearAllHardwareWatchpoints(), lldb_private::NativeRegisterContextDBReg_x86::ClearHardwareWatchpoint(), lldb_private::NativeRegisterContextDBReg_x86::ClearWatchpointHit(), GetRegistersAsJSON(), lldb_private::NativeRegisterContextDBReg_x86::GetWatchpointAddress(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_g(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_p(), lldb_private::NativeRegisterContextDBReg_x86::IsWatchpointHit(), lldb_private::NativeRegisterContextDBReg_x86::IsWatchpointVacant(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::PrepareStopReplyPacketForThread(), ReadRegisterAsUnsigned(), lldb_private::NativeRegisterContextDBReg_x86::SetHardwareWatchpointWithIndex(), lldb_private::process_linux::NativeRegisterContextLinux::WriteRegisterRaw(), and WriteRegisterValueInHexFixedWidth().
uint64_t NativeRegisterContext::ReadRegisterAsUnsigned | ( | const RegisterInfo * | reg_info, |
lldb::addr_t | fail_value | ||
) |
Definition at line 194 of file NativeRegisterContext.cpp.
References error(), lldb_private::RegisterValue::GetAsUInt64(), lldb_private::GetLog(), LLDB_LOGF, ReadRegister(), and lldb_private::Thread.
lldb::addr_t NativeRegisterContext::ReadRegisterAsUnsigned | ( | uint32_t | reg, |
lldb::addr_t | fail_value | ||
) |
Definition at line 186 of file NativeRegisterContext.cpp.
References GetRegisterInfoAtIndex(), LLDB_INVALID_REGNUM, and ReadRegisterAsUnsigned().
Referenced by lldb_private::NativeThreadWindows::DoResume(), GetFlags(), GetFP(), GetPC(), GetReturnAddress(), GetSP(), ReadFlags(), ReadRegisterAsUnsigned(), and lldb_private::process_linux::NativeProcessLinux::Syscall().
|
virtual |
Definition at line 309 of file NativeRegisterContext.cpp.
References lldb_private::RegisterInfo::byte_size, lldb_private::RegisterInfo::data(), error(), lldb_private::NativeProcessProtocol::GetByteOrder(), lldb_private::NativeThreadProtocol::GetProcess(), m_thread, lldb_private::RegisterInfo::name, lldb_private::NativeProcessProtocol::ReadMemory(), and lldb_private::RegisterValue::SetFromMemoryData().
|
inlinevirtual |
Definition at line 124 of file NativeRegisterContext.h.
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::BuildTargetXml(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qRegisterInfo().
Status NativeRegisterContext::SetFP | ( | lldb::addr_t | fp | ) |
Definition at line 167 of file NativeRegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, fp, LLDB_REGNUM_GENERIC_FP, and WriteRegisterFromUnsigned().
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64.
Definition at line 243 of file NativeRegisterContext.cpp.
References LLDB_INVALID_INDEX32.
Referenced by lldb_private::process_freebsd::NativeThreadFreeBSD::SetHardwareBreakpoint(), and lldb_private::process_netbsd::NativeThreadNetBSD::SetHardwareBreakpoint().
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64, and lldb_private::NativeRegisterContextDBReg_x86.
Definition at line 264 of file NativeRegisterContext.cpp.
References LLDB_INVALID_INDEX32.
Referenced by lldb_private::process_freebsd::NativeThreadFreeBSD::SetWatchpoint(), and lldb_private::process_netbsd::NativeThreadNetBSD::SetWatchpoint().
Status NativeRegisterContext::SetPC | ( | lldb::addr_t | pc | ) |
Definition at line 143 of file NativeRegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC, pc, and WriteRegisterFromUnsigned().
Referenced by lldb_private::NativeProcessProtocol::FixupBreakpointPCAsNeeded(), and lldb_private::process_linux::NativeProcessLinux::Syscall().
Status NativeRegisterContext::SetSP | ( | lldb::addr_t | sp | ) |
Definition at line 155 of file NativeRegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP, sp, and WriteRegisterFromUnsigned().
|
pure virtual |
|
pure virtual |
Referenced by lldb_private::NativeRegisterContextDBReg_x86::ClearAllHardwareWatchpoints(), lldb_private::NativeRegisterContextDBReg_x86::ClearHardwareWatchpoint(), lldb_private::NativeRegisterContextDBReg_x86::ClearWatchpointHit(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_P(), lldb_private::NativeRegisterContextDBReg_x86::SetHardwareWatchpointWithIndex(), and WriteRegisterFromUnsigned().
Status NativeRegisterContext::WriteRegisterFromUnsigned | ( | const RegisterInfo * | reg_info, |
uint64_t | uval | ||
) |
Definition at line 224 of file NativeRegisterContext.cpp.
References lldb_private::RegisterInfo::byte_size, lldb_private::RegisterValue::SetUInt(), and WriteRegister().
Status NativeRegisterContext::WriteRegisterFromUnsigned | ( | uint32_t | reg, |
uint64_t | uval | ||
) |
Definition at line 216 of file NativeRegisterContext.cpp.
References GetRegisterInfoAtIndex(), LLDB_INVALID_REGNUM, and WriteRegisterFromUnsigned().
Referenced by lldb_private::NativeThreadWindows::DoResume(), SetFP(), SetPC(), SetSP(), and WriteRegisterFromUnsigned().
|
virtual |
Definition at line 374 of file NativeRegisterContext.cpp.
References lldb_private::RegisterInfo::data(), error(), lldb_private::RegisterValue::GetAsMemoryData(), lldb_private::NativeProcessProtocol::GetByteOrder(), lldb_private::NativeThreadProtocol::GetProcess(), m_thread, and lldb_private::NativeProcessProtocol::WriteMemory().
|
protected |
Definition at line 176 of file NativeRegisterContext.h.
Referenced by lldb_private::process_linux::NativeRegisterContextLinux::DoReadRegisterValue(), lldb_private::process_netbsd::NativeRegisterContextNetBSD::DoRegisterSet(), lldb_private::process_linux::NativeRegisterContextLinux::DoWriteRegisterValue(), lldb_private::process_linux::NativeRegisterContextLinux::GetByteOrder(), lldb_private::process_freebsd::NativeRegisterContextFreeBSD::GetProcess(), lldb_private::process_netbsd::NativeRegisterContextNetBSD::GetProcess(), GetThread(), lldb_private::NativeRegisterContextWindows::GetThreadHandle(), GetThreadID(), lldb_private::process_linux::NativeRegisterContextLinux::ReadFPR(), lldb_private::process_linux::NativeRegisterContextLinux::ReadGPR(), lldb_private::process_linux::NativeRegisterContextLinux::ReadRegisterSet(), ReadRegisterValueFromMemory(), lldb_private::process_linux::NativeRegisterContextLinux::WriteFPR(), lldb_private::process_linux::NativeRegisterContextLinux::WriteGPR(), lldb_private::process_linux::NativeRegisterContextLinux::WriteRegisterSet(), and WriteRegisterValueToMemory().