|
LLDB mainline
|
A wrapper class representing an execution context with non-null Target and Process pointers, a locked API mutex and a locked ProcessRunLock. More...
#include <ExecutionContext.h>
Public Member Functions | |
| StoppedExecutionContext (lldb::TargetSP &target_sp, lldb::ProcessSP &process_sp, lldb::ThreadSP &thread_sp, lldb::StackFrameSP &frame_sp, std::unique_lock< std::recursive_mutex > api_lock, ProcessRunLock::ProcessRunLocker stop_locker) | |
| StoppedExecutionContext (StoppedExecutionContext &&other) | |
| Transfers ownership of the locks from other to this, making other unusable. | |
| std::unique_lock< std::recursive_mutex > | AllowResume () |
| Clears this context, unlocking the ProcessRunLock and returning the locked API lock, allowing callers to resume the process. | |
| Public Member Functions inherited from lldb_private::ExecutionContext | |
| ExecutionContext () | |
| Default Constructor. | |
| ExecutionContext (const ExecutionContext &rhs) | |
| ExecutionContext (Target *t, bool fill_current_process_thread_frame=true) | |
| ExecutionContext (const lldb::TargetSP &target_sp, bool get_process) | |
| ExecutionContext (const lldb::ProcessSP &process_sp) | |
| ExecutionContext (const lldb::ThreadSP &thread_sp) | |
| ExecutionContext (const lldb::StackFrameSP &frame_sp) | |
| ExecutionContext (const lldb::TargetWP &target_wp, bool get_process) | |
| ExecutionContext (const lldb::ProcessWP &process_wp) | |
| ExecutionContext (const lldb::ThreadWP &thread_wp) | |
| ExecutionContext (const lldb::StackFrameWP &frame_wp) | |
| ExecutionContext (const ExecutionContextRef &exe_ctx_ref) | |
| ExecutionContext (const ExecutionContextRef *exe_ctx_ref, bool thread_and_frame_only_if_stopped=false) | |
| ExecutionContext (ExecutionContextScope *exe_scope) | |
| ExecutionContext (ExecutionContextScope &exe_scope) | |
| ExecutionContext (Process *process, Thread *thread=nullptr, StackFrame *frame=nullptr) | |
| Construct with process, thread, and frame index. | |
| ~ExecutionContext () | |
| ExecutionContext & | operator= (const ExecutionContext &rhs) |
| bool | operator== (const ExecutionContext &rhs) const |
| bool | operator!= (const ExecutionContext &rhs) const |
| void | Clear () |
| Clear the object's state. | |
| RegisterContext * | GetRegisterContext () const |
| ExecutionContextScope * | GetBestExecutionContextScope () const |
| uint32_t | GetAddressByteSize () const |
| lldb::ByteOrder | GetByteOrder () const |
| Target * | GetTargetPtr () const |
| Returns a pointer to the target object. | |
| Process * | GetProcessPtr () const |
| Returns a pointer to the process object. | |
| Thread * | GetThreadPtr () const |
| Returns a pointer to the thread object. | |
| StackFrame * | GetFramePtr () const |
| Returns a pointer to the frame object. | |
| Target & | GetTargetRef () const |
| Returns a reference to the target object. | |
| Process & | GetProcessRef () const |
| Returns a reference to the process object. | |
| Thread & | GetThreadRef () const |
| Returns a reference to the thread object. | |
| StackFrame & | GetFrameRef () const |
| Returns a reference to the thread object. | |
| const lldb::TargetSP & | GetTargetSP () const |
| Get accessor to get the target shared pointer. | |
| const lldb::ProcessSP & | GetProcessSP () const |
| Get accessor to get the process shared pointer. | |
| const lldb::ThreadSP & | GetThreadSP () const |
| Get accessor to get the thread shared pointer. | |
| const lldb::StackFrameSP & | GetFrameSP () const |
| Get accessor to get the frame shared pointer. | |
| void | SetTargetSP (const lldb::TargetSP &target_sp) |
| Set accessor to set only the target shared pointer. | |
| void | SetProcessSP (const lldb::ProcessSP &process_sp) |
| Set accessor to set only the process shared pointer. | |
| void | SetThreadSP (const lldb::ThreadSP &thread_sp) |
| Set accessor to set only the thread shared pointer. | |
| void | SetFrameSP (const lldb::StackFrameSP &frame_sp) |
| Set accessor to set only the frame shared pointer. | |
| void | SetTargetPtr (Target *target) |
| Set accessor to set only the target shared pointer from a target pointer. | |
| void | SetProcessPtr (Process *process) |
| Set accessor to set only the process shared pointer from a process pointer. | |
| void | SetThreadPtr (Thread *thread) |
| Set accessor to set only the thread shared pointer from a thread pointer. | |
| void | SetFramePtr (StackFrame *frame) |
| Set accessor to set only the frame shared pointer from a frame pointer. | |
| void | SetContext (const lldb::TargetSP &target_sp, bool get_process) |
| void | SetContext (const lldb::ProcessSP &process_sp) |
| void | SetContext (const lldb::ThreadSP &thread_sp) |
| void | SetContext (const lldb::StackFrameSP &frame_sp) |
| bool | HasTargetScope () const |
| Returns true the ExecutionContext object contains a valid target. | |
| bool | HasProcessScope () const |
| Returns true the ExecutionContext object contains a valid target and process. | |
| bool | HasThreadScope () const |
| Returns true the ExecutionContext object contains a valid target, process, and thread. | |
| bool | HasFrameScope () const |
| Returns true the ExecutionContext object contains a valid target, process, thread and frame. | |
Private Attributes | |
| std::unique_lock< std::recursive_mutex > | m_api_lock |
| ProcessRunLock::ProcessRunLocker | m_stop_locker |
Additional Inherited Members | |
| Protected Attributes inherited from lldb_private::ExecutionContext | |
| lldb::TargetSP | m_target_sp |
| The target that owns the process/thread/frame. | |
| lldb::ProcessSP | m_process_sp |
| The process that owns the thread/frame. | |
| lldb::ThreadSP | m_thread_sp |
| The thread that owns the frame. | |
| lldb::StackFrameSP | m_frame_sp |
| The stack frame in thread. | |
A wrapper class representing an execution context with non-null Target and Process pointers, a locked API mutex and a locked ProcessRunLock.
The locks are private by design: to unlock them, destroy the StoppedExecutionContext.
Definition at line 577 of file ExecutionContext.h.
|
inline |
Definition at line 578 of file ExecutionContext.h.
References m_api_lock, m_stop_locker, lldb_private::ExecutionContext::SetFrameSP(), lldb_private::ExecutionContext::SetProcessSP(), lldb_private::ExecutionContext::SetTargetSP(), and lldb_private::ExecutionContext::SetThreadSP().
Referenced by StoppedExecutionContext().
|
inline |
Transfers ownership of the locks from other to this, making other unusable.
Definition at line 597 of file ExecutionContext.h.
References m_api_lock, lldb_private::ExecutionContext::m_frame_sp, lldb_private::ExecutionContext::m_process_sp, m_stop_locker, lldb_private::ExecutionContext::m_target_sp, lldb_private::ExecutionContext::m_thread_sp, and StoppedExecutionContext().
|
nodiscard |
Clears this context, unlocking the ProcessRunLock and returning the locked API lock, allowing callers to resume the process.
Similar to a move operation, this object is no longer usable.
Definition at line 167 of file ExecutionContext.cpp.
References lldb_private::ExecutionContext::Clear(), m_api_lock, and m_stop_locker.
Referenced by ResumeNewPlan().
|
private |
Definition at line 611 of file ExecutionContext.h.
Referenced by AllowResume(), StoppedExecutionContext(), and StoppedExecutionContext().
|
private |
Definition at line 612 of file ExecutionContext.h.
Referenced by AllowResume(), StoppedExecutionContext(), and StoppedExecutionContext().