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 |
virtual std::string | GetName ()=0 |
virtual lldb::StateType | GetState ()=0 |
virtual NativeRegisterContext & | GetRegisterContext ()=0 |
virtual bool | GetStopReason (ThreadStopInfo &stop_info, std::string &description)=0 |
lldb::tid_t | GetID () const |
NativeProcessProtocol & | GetProcess () |
virtual Status | SetWatchpoint (lldb::addr_t addr, size_t size, uint32_t watch_flags, bool hardware)=0 |
virtual Status | RemoveWatchpoint (lldb::addr_t addr)=0 |
virtual Status | SetHardwareBreakpoint (lldb::addr_t addr, size_t size)=0 |
virtual Status | RemoveHardwareBreakpoint (lldb::addr_t addr)=0 |
virtual llvm::Expected< std::unique_ptr< llvm::MemoryBuffer > > | GetSiginfo () const |
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.
|
private |
Definition at line 309 of file NativeThreadFreeBSD.cpp.
References lldb_private::process_freebsd::NativeRegisterContextFreeBSD::CopyHardwareWatchpointsFrom(), GetRegisterContext(), m_hw_break_index_map, and m_watchpoint_index_map.
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.
Referenced by GetName().
|
overridevirtual |
Implements lldb_private::NativeThreadProtocol.
Definition at line 246 of file NativeThreadFreeBSD.cpp.
References m_reg_context_up.
Referenced by CopyWatchpointsFrom(), lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorSIGTRAP(), 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(), and m_hw_break_index_map.
Referenced by SetHardwareBreakpoint().
|
overridevirtual |
Implements lldb_private::NativeThreadProtocol.
Definition at line 267 of file NativeThreadFreeBSD.cpp.
References lldb_private::Status::FromErrorString(), GetRegisterContext(), and m_watchpoint_index_map.
Referenced by SetWatchpoint().
|
private |
Definition at line 44 of file NativeThreadFreeBSD.cpp.
References lldb_private::Status::Clear(), lldb_private::Status::GetError(), lldb_private::NativeThreadProtocol::GetID(), lldb_private::process_freebsd::NativeProcessFreeBSD::PtraceWrapper(), SetRunning(), and lldb_private::Status::Success().
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::Resume().
|
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(), and lldb_private::NativeRegisterContext::SetHardwareBreakpoint().
|
private |
Definition at line 172 of file NativeThreadFreeBSD.cpp.
References m_state, m_stop_info, and lldb_private::ThreadStopInfo::reason.
Referenced by Resume().
|
private |
Definition at line 177 of file NativeThreadFreeBSD.cpp.
References m_state, m_stop_info, and lldb_private::ThreadStopInfo::reason.
Referenced by SingleStep().
|
private |
Definition at line 166 of file NativeThreadFreeBSD.cpp.
References 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 m_stop_info, lldb_private::ThreadStopInfo::reason, SetStopped(), lldb_private::ThreadStopInfo::signo, and SIGTRAP.
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorSIGTRAP().
|
private |
Definition at line 111 of file NativeThreadFreeBSD.cpp.
References m_stop_info, lldb_private::ThreadStopInfo::reason, SetStopped(), lldb_private::ThreadStopInfo::signo, and SIGTRAP.
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorSIGTRAP().
|
private |
Definition at line 132 of file NativeThreadFreeBSD.cpp.
References lldb_private::ThreadStopInfo::child_pid, lldb_private::ThreadStopInfo::child_tid, lldb_private::ThreadStopInfo::details, lldb_private::ThreadStopInfo::fork, m_stop_info, lldb_private::ThreadStopInfo::reason, SetStopped(), lldb_private::ThreadStopInfo::signo, and SIGTRAP.
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorClone().
|
private |
Definition at line 76 of file NativeThreadFreeBSD.cpp.
References GetCrashReasonString(), lldb_private::NativeThreadProtocol::GetID(), lldb_private::GetLog(), LLDB_LOG, m_stop_description, m_stop_info, lldb_private::ThreadStopInfo::reason, SetStopped(), lldb_private::ThreadStopInfo::signo, 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(), lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorSignal(), and lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorSIGSTOP().
|
private |
Definition at line 105 of file NativeThreadFreeBSD.cpp.
References m_stop_info, lldb_private::ThreadStopInfo::reason, SetStopped(), lldb_private::ThreadStopInfo::signo, and SIGTRAP.
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorSIGTRAP().
|
private |
Definition at line 142 of file NativeThreadFreeBSD.cpp.
References lldb_private::ThreadStopInfo::child_pid, lldb_private::ThreadStopInfo::child_tid, lldb_private::ThreadStopInfo::details, lldb_private::ThreadStopInfo::fork, m_stop_info, lldb_private::ThreadStopInfo::reason, SetStopped(), lldb_private::ThreadStopInfo::signo, and SIGTRAP.
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorClone().
|
private |
Definition at line 152 of file NativeThreadFreeBSD.cpp.
References m_stop_info, lldb_private::ThreadStopInfo::reason, SetStopped(), lldb_private::ThreadStopInfo::signo, and SIGTRAP.
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorSIGTRAP().
|
private |
Definition at line 117 of file NativeThreadFreeBSD.cpp.
References GetRegisterContext(), lldb_private::NativeRegisterContext::GetWatchpointAddress(), lldb_private::NativeRegisterContext::GetWatchpointHitAddress(), LLDB_INVALID_INDEX32, lldbassert, m_stop_description, m_stop_info, lldb_private::ThreadStopInfo::reason, SetStopped(), lldb_private::ThreadStopInfo::signo, and SIGTRAP.
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorSIGTRAP().
|
private |
Definition at line 159 of file NativeThreadFreeBSD.cpp.
References m_stop_info, lldb_private::ThreadStopInfo::reason, SetStopped(), and lldb_private::ThreadStopInfo::signo.
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorSignal().
|
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(), and lldb_private::NativeRegisterContext::SetHardwareWatchpoint().
|
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().
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::Resume().
|
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().
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::Resume().
|
friend |
Definition at line 26 of file NativeThreadFreeBSD.h.
|
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().
|
private |
Definition at line 78 of file NativeThreadFreeBSD.h.
Referenced by GetName(), GetState(), GetStopReason(), SetHardwareBreakpoint(), SetRunning(), SetStepping(), SetStopped(), and SetWatchpoint().
|
private |
Definition at line 81 of file NativeThreadFreeBSD.h.
Referenced by GetStopReason(), SetStopped(), SetStoppedBySignal(), and SetStoppedByWatchpoint().
|
private |
Definition at line 79 of file NativeThreadFreeBSD.h.
Referenced by GetStopReason(), 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().