LLDB mainline
|
#include <NativeThreadFreeBSD.h>
Public Member Functions | |
NativeThreadFreeBSD (NativeProcessFreeBSD &process, lldb::tid_t tid) | |
std::string | GetName () override |
lldb::StateType | GetState () override |
bool | GetStopReason (ThreadStopInfo &stop_info, std::string &description) override |
NativeRegisterContextFreeBSD & | GetRegisterContext () override |
Status | SetWatchpoint (lldb::addr_t addr, size_t size, uint32_t watch_flags, bool hardware) override |
Status | RemoveWatchpoint (lldb::addr_t addr) override |
Status | SetHardwareBreakpoint (lldb::addr_t addr, size_t size) override |
Status | RemoveHardwareBreakpoint (lldb::addr_t addr) override |
NativeProcessFreeBSD & | GetProcess () |
llvm::Expected< std::unique_ptr< llvm::MemoryBuffer > > | GetSiginfo () const override |
Public Member Functions inherited from lldb_private::NativeThreadProtocol | |
NativeThreadProtocol (NativeProcessProtocol &process, lldb::tid_t tid) | |
virtual | ~NativeThreadProtocol ()=default |
lldb::tid_t | GetID () const |
NativeProcessProtocol & | GetProcess () |
Private Types | |
using | WatchpointIndexMap = std::map<lldb::addr_t, uint32_t> |
Private Member Functions | |
Status | Resume () |
Status | SingleStep () |
Status | Suspend () |
void | SetStoppedBySignal (uint32_t signo, const siginfo_t *info=nullptr) |
void | SetStoppedByBreakpoint () |
void | SetStoppedByTrace () |
void | SetStoppedByExec () |
void | SetStoppedByWatchpoint (uint32_t wp_index) |
void | SetStoppedByFork (lldb::pid_t child_pid, lldb::tid_t child_tid) |
void | SetStoppedByVFork (lldb::pid_t child_pid, lldb::tid_t child_tid) |
void | SetStoppedByVForkDone () |
void | SetStoppedWithNoReason () |
void | SetStopped () |
void | SetRunning () |
void | SetStepping () |
llvm::Error | CopyWatchpointsFrom (NativeThreadFreeBSD &source) |
Private Attributes | |
lldb::StateType | m_state |
ThreadStopInfo | m_stop_info |
std::unique_ptr< NativeRegisterContextFreeBSD > | m_reg_context_up |
std::string | m_stop_description |
WatchpointIndexMap | m_watchpoint_index_map |
WatchpointIndexMap | m_hw_break_index_map |
Friends | |
class | NativeProcessFreeBSD |
Additional Inherited Members | |
Protected Attributes inherited from lldb_private::NativeThreadProtocol | |
NativeProcessProtocol & | m_process |
lldb::tid_t | m_tid |
Definition at line 25 of file NativeThreadFreeBSD.h.
|
private |
Definition at line 82 of file NativeThreadFreeBSD.h.
NativeThreadFreeBSD::NativeThreadFreeBSD | ( | NativeProcessFreeBSD & | process, |
lldb::tid_t | tid ) |
Definition at line 35 of file NativeThreadFreeBSD.cpp.
References lldb::eStateInvalid, m_reg_context_up, m_state, m_stop_description, m_stop_info, NativeProcessFreeBSD, and lldb_private::NativeThreadProtocol::NativeThreadProtocol().
Referenced by CopyWatchpointsFrom(), and NativeProcessFreeBSD.
|
private |
Definition at line 309 of file NativeThreadFreeBSD.cpp.
References lldb_private::process_freebsd::NativeRegisterContextFreeBSD::CopyHardwareWatchpointsFrom(), GetRegisterContext(), m_hw_break_index_map, m_watchpoint_index_map, and NativeThreadFreeBSD().
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorSIGTRAP().
|
overridevirtual |
Implements lldb_private::NativeThreadProtocol.
Definition at line 182 of file NativeThreadFreeBSD.cpp.
References error(), lldb_private::NativeProcessProtocol::GetID(), lldb_private::NativeThreadProtocol::GetID(), lldb_private::GetLog(), GetProcess(), LLDB_LOG, m_state, and lldb_private::Thread.
NativeProcessFreeBSD & NativeThreadFreeBSD::GetProcess | ( | ) |
Definition at line 319 of file NativeThreadFreeBSD.cpp.
References lldb_private::NativeThreadProtocol::m_process, and NativeProcessFreeBSD.
Referenced by GetName().
|
overridevirtual |
Implements lldb_private::NativeThreadProtocol.
Definition at line 246 of file NativeThreadFreeBSD.cpp.
References m_reg_context_up.
Referenced by CopyWatchpointsFrom(), RemoveHardwareBreakpoint(), RemoveWatchpoint(), SetHardwareBreakpoint(), SetStoppedByWatchpoint(), and SetWatchpoint().
|
overridevirtual |
Reimplemented from lldb_private::NativeThreadProtocol.
Definition at line 324 of file NativeThreadFreeBSD.cpp.
References lldb_private::NativeThreadProtocol::GetID(), lldb_private::GetLog(), LLDB_LOG, lldb_private::Process, and lldb_private::process_freebsd::NativeProcessFreeBSD::PtraceWrapper().
|
overridevirtual |
Implements lldb_private::NativeThreadProtocol.
Definition at line 214 of file NativeThreadFreeBSD.cpp.
References m_state.
|
overridevirtual |
Implements lldb_private::NativeThreadProtocol.
Definition at line 216 of file NativeThreadFreeBSD.cpp.
References lldb::eStateAttaching, lldb::eStateConnected, lldb::eStateCrashed, lldb::eStateDetached, lldb::eStateExited, lldb::eStateInvalid, lldb::eStateLaunching, lldb::eStateRunning, lldb::eStateStepping, lldb::eStateStopped, lldb::eStateSuspended, lldb::eStateUnloaded, lldb_private::NativeThreadProtocol::GetID(), lldb_private::GetLog(), LLDB_LOG, m_state, m_stop_description, m_stop_info, lldb_private::StateAsCString(), and lldb_private::Thread.
|
overridevirtual |
Implements lldb_private::NativeThreadProtocol.
Definition at line 294 of file NativeThreadFreeBSD.cpp.
References lldb_private::Status::FromErrorString(), GetRegisterContext(), m_hw_break_index_map, and lldb_private::Status.
Referenced by SetHardwareBreakpoint().
|
overridevirtual |
Implements lldb_private::NativeThreadProtocol.
Definition at line 267 of file NativeThreadFreeBSD.cpp.
References lldb_private::Status::FromErrorString(), GetRegisterContext(), m_watchpoint_index_map, and lldb_private::Status.
Referenced by SetWatchpoint().
|
private |
|
overridevirtual |
Implements lldb_private::NativeThreadProtocol.
Definition at line 278 of file NativeThreadFreeBSD.cpp.
References error(), lldb::eStateStopped, lldb_private::Status::FromErrorString(), GetRegisterContext(), LLDB_INVALID_INDEX32, m_hw_break_index_map, m_state, RemoveHardwareBreakpoint(), lldb_private::NativeRegisterContext::SetHardwareBreakpoint(), and lldb_private::Status.
|
private |
Definition at line 172 of file NativeThreadFreeBSD.cpp.
References lldb::eStateRunning, lldb::eStopReasonNone, m_state, and m_stop_info.
Referenced by Resume().
|
private |
Definition at line 177 of file NativeThreadFreeBSD.cpp.
References lldb::eStateStepping, lldb::eStopReasonNone, m_state, and m_stop_info.
Referenced by SingleStep().
|
private |
Definition at line 166 of file NativeThreadFreeBSD.cpp.
References lldb::eStateStopped, m_state, and m_stop_description.
Referenced by SetStoppedByBreakpoint(), SetStoppedByExec(), SetStoppedByFork(), SetStoppedBySignal(), SetStoppedByTrace(), SetStoppedByVFork(), SetStoppedByVForkDone(), SetStoppedByWatchpoint(), SetStoppedWithNoReason(), and Suspend().
|
private |
Definition at line 99 of file NativeThreadFreeBSD.cpp.
References lldb::eStopReasonBreakpoint, m_stop_info, SetStopped(), and SIGTRAP.
|
private |
Definition at line 111 of file NativeThreadFreeBSD.cpp.
References lldb::eStopReasonExec, m_stop_info, SetStopped(), and SIGTRAP.
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorSIGTRAP().
|
private |
Definition at line 132 of file NativeThreadFreeBSD.cpp.
References lldb::eStopReasonFork, m_stop_info, SetStopped(), and SIGTRAP.
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorClone().
|
private |
Definition at line 76 of file NativeThreadFreeBSD.cpp.
References lldb::eStopReasonSignal, GetCrashReasonString(), lldb_private::NativeThreadProtocol::GetID(), lldb_private::GetLog(), LLDB_LOG, m_stop_description, m_stop_info, SetStopped(), SIGBUS, SIGFPE, SIGILL, SIGSEGV, and lldb_private::Thread.
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::Attach(), lldb_private::process_freebsd::NativeProcessFreeBSD::Manager::Launch(), lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorClone(), and lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorSIGSTOP().
|
private |
Definition at line 105 of file NativeThreadFreeBSD.cpp.
References lldb::eStopReasonTrace, m_stop_info, SetStopped(), and SIGTRAP.
|
private |
Definition at line 142 of file NativeThreadFreeBSD.cpp.
References lldb::eStopReasonVFork, m_stop_info, SetStopped(), and SIGTRAP.
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorClone().
|
private |
Definition at line 152 of file NativeThreadFreeBSD.cpp.
References lldb::eStopReasonVForkDone, m_stop_info, SetStopped(), and SIGTRAP.
|
private |
Definition at line 117 of file NativeThreadFreeBSD.cpp.
References lldb::eStopReasonWatchpoint, GetRegisterContext(), lldb_private::NativeRegisterContext::GetWatchpointAddress(), lldb_private::NativeRegisterContext::GetWatchpointHitAddress(), LLDB_INVALID_INDEX32, lldbassert, m_stop_description, m_stop_info, SetStopped(), and SIGTRAP.
|
private |
Definition at line 159 of file NativeThreadFreeBSD.cpp.
References lldb::eStopReasonNone, m_stop_info, and SetStopped().
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorSIGTRAP().
|
overridevirtual |
Implements lldb_private::NativeThreadProtocol.
Definition at line 251 of file NativeThreadFreeBSD.cpp.
References error(), lldb::eStateStopped, lldb_private::Status::FromErrorString(), GetRegisterContext(), LLDB_INVALID_INDEX32, m_state, m_watchpoint_index_map, RemoveWatchpoint(), lldb_private::NativeRegisterContext::SetHardwareWatchpoint(), and lldb_private::Status.
|
private |
Definition at line 59 of file NativeThreadFreeBSD.cpp.
References lldb_private::NativeThreadProtocol::GetID(), lldb_private::process_freebsd::NativeProcessFreeBSD::PtraceWrapper(), SetStepping(), and lldb_private::Status::Success().
|
private |
Definition at line 69 of file NativeThreadFreeBSD.cpp.
References lldb_private::NativeThreadProtocol::GetID(), lldb_private::process_freebsd::NativeProcessFreeBSD::PtraceWrapper(), SetStopped(), and lldb_private::Status::Success().
|
friend |
Definition at line 26 of file NativeThreadFreeBSD.h.
References NativeProcessFreeBSD, and NativeThreadFreeBSD().
Referenced by GetProcess(), NativeProcessFreeBSD, and NativeThreadFreeBSD().
|
private |
Definition at line 84 of file NativeThreadFreeBSD.h.
Referenced by CopyWatchpointsFrom(), RemoveHardwareBreakpoint(), and SetHardwareBreakpoint().
|
private |
Definition at line 80 of file NativeThreadFreeBSD.h.
Referenced by GetRegisterContext(), and NativeThreadFreeBSD().
|
private |
Definition at line 78 of file NativeThreadFreeBSD.h.
Referenced by GetName(), GetState(), GetStopReason(), NativeThreadFreeBSD(), SetHardwareBreakpoint(), SetRunning(), SetStepping(), SetStopped(), and SetWatchpoint().
|
private |
Definition at line 81 of file NativeThreadFreeBSD.h.
Referenced by GetStopReason(), NativeThreadFreeBSD(), SetStopped(), SetStoppedBySignal(), and SetStoppedByWatchpoint().
|
private |
Definition at line 79 of file NativeThreadFreeBSD.h.
Referenced by GetStopReason(), NativeThreadFreeBSD(), SetRunning(), SetStepping(), SetStoppedByBreakpoint(), SetStoppedByExec(), SetStoppedByFork(), SetStoppedBySignal(), SetStoppedByTrace(), SetStoppedByVFork(), SetStoppedByVForkDone(), SetStoppedByWatchpoint(), and SetStoppedWithNoReason().
|
private |
Definition at line 83 of file NativeThreadFreeBSD.h.
Referenced by CopyWatchpointsFrom(), RemoveWatchpoint(), and SetWatchpoint().