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 254 of file NativeRegisterContext.cpp.
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64, and lldb_private::NativeRegisterContextDBReg_x86.
Definition at line 284 of file NativeRegisterContext.cpp.
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64.
Definition at line 258 of file NativeRegisterContext.cpp.
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64, and lldb_private::NativeRegisterContextDBReg_x86.
Definition at line 276 of file NativeRegisterContext.cpp.
Reimplemented in lldb_private::NativeRegisterContextDBReg_x86.
Definition at line 280 of file NativeRegisterContext.cpp.
uint32_t NativeRegisterContext::ConvertRegisterKindToRegisterNumber | ( | uint32_t | kind, |
uint32_t | num | ||
) | const |
Definition at line 426 of file NativeRegisterContext.cpp.
References GetRegisterCount(), GetRegisterInfoAtIndex(), 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 442 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 182 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 164 of file NativeRegisterContext.cpp.
References ConvertRegisterKindToRegisterNumber(), lldb::eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FP, and ReadRegisterAsUnsigned().
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64.
Definition at line 262 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 142 of file NativeRegisterContext.cpp.
References GetPC().
Referenced by lldb_private::NativeProcessProtocol::FixupBreakpointPCAsNeeded().
|
pure virtual |
Implemented in lldb_private::NativeRegisterContextRegisterInfo.
Referenced by ConvertRegisterKindToRegisterNumber(), and GetRegisterInfoByName().
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::eRegisterKindGeneric, GetRegisterCount(), GetRegisterInfo(), GetRegisterInfoAtIndex(), LLDB_INVALID_REGNUM, and lldb_private::Args::StringToGenericRegister().
const char * NativeRegisterContext::GetRegisterName | ( | uint32_t | reg | ) |
Definition at line 89 of file NativeRegisterContext.cpp.
References GetRegisterInfoAtIndex().
|
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(), and GetRegisterSetCount().
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 176 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 152 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 243 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 305 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 309 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 293 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 313 of file NativeRegisterContext.cpp.
Reimplemented in lldb_private::NativeRegisterContextDBReg_x86.
Definition at line 288 of file NativeRegisterContext.cpp.
Reimplemented in lldb_private::NativeRegisterContextDBReg_x86.
Definition at line 299 of file NativeRegisterContext.cpp.
|
virtual |
Reimplemented in lldb_private::NativeRegisterContextDBReg_arm64.
Definition at line 247 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 268 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 197 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 189 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 315 of file NativeRegisterContext.cpp.
References error(), lldb_private::NativeProcessProtocol::GetByteOrder(), lldb_private::NativeThreadProtocol::GetProcess(), lldb_private::RegisterValue::kMaxRegisterByteSize, m_thread, 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 170 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 249 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 270 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 146 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 158 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 230 of file NativeRegisterContext.cpp.
References lldb_private::RegisterValue::SetUInt(), and WriteRegister().
Definition at line 222 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 385 of file NativeRegisterContext.cpp.
References error(), lldb_private::RegisterValue::GetAsMemoryData(), lldb_private::NativeProcessProtocol::GetByteOrder(), lldb_private::NativeThreadProtocol::GetProcess(), lldb_private::RegisterValue::kMaxRegisterByteSize, 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().