1 //===-- SBThread.h ----------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_SBThreadPlan_h_
11 #define LLDB_SBThreadPlan_h_
13 #include "lldb/API/SBDefines.h"
19 class LLDB_API SBThreadPlan {
21 friend class lldb_private::ThreadPlan;
26 SBThreadPlan(const lldb::SBThreadPlan &threadPlan);
28 SBThreadPlan(const lldb::ThreadPlanSP &lldb_object_sp);
30 SBThreadPlan(lldb::SBThread &thread, const char *class_name);
38 lldb::StopReason GetStopReason();
40 /// Get the number of words associated with the stop reason.
41 /// See also GetStopReasonDataAtIndex().
42 size_t GetStopReasonDataCount();
44 //--------------------------------------------------------------------------
45 /// Get information associated with a stop reason.
47 /// Breakpoint stop reasons will have data that consists of pairs of
48 /// breakpoint IDs followed by the breakpoint location IDs (they always come
51 /// Stop Reason Count Data Type
52 /// ======================== ===== =========================================
54 /// eStopReasonTrace 0
55 /// eStopReasonBreakpoint N duple: {breakpoint id, location id}
56 /// eStopReasonWatchpoint 1 watchpoint id
57 /// eStopReasonSignal 1 unix signal number
58 /// eStopReasonException N exception data
60 /// eStopReasonPlanComplete 0
61 //--------------------------------------------------------------------------
62 uint64_t GetStopReasonDataAtIndex(uint32_t idx);
64 SBThread GetThread() const;
66 const lldb::SBThreadPlan &operator=(const lldb::SBThreadPlan &rhs);
68 bool GetDescription(lldb::SBStream &description) const;
70 void SetPlanComplete(bool success);
72 bool IsPlanComplete();
78 // This section allows an SBThreadPlan to push another of the common types of
80 SBThreadPlan QueueThreadPlanForStepOverRange(SBAddress &start_address,
81 lldb::addr_t range_size);
83 SBThreadPlan QueueThreadPlanForStepInRange(SBAddress &start_address,
84 lldb::addr_t range_size);
86 SBThreadPlan QueueThreadPlanForStepOut(uint32_t frame_idx_to_step_to,
87 bool first_insn = false);
89 SBThreadPlan QueueThreadPlanForRunToAddress(SBAddress address);
92 lldb_private::ThreadPlan *get();
96 friend class SBBreakpoint;
97 friend class SBBreakpointLocation;
99 friend class SBProcess;
100 friend class SBDebugger;
101 friend class SBValue;
102 friend class lldb_private::QueueImpl;
103 friend class SBQueueItem;
106 void SetThreadPlan(const lldb::ThreadPlanSP &lldb_object_sp);
110 lldb::ThreadPlanSP m_opaque_sp;
115 #endif // LLDB_SBThreadPlan_h_