Raphael Isemann | 8081428 | 2020-01-24 08:23:27 +0100 | [diff] [blame] | 1 | //===-- SBThreadPlan.cpp --------------------------------------------------===// |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 9 | #include "SBReproducerPrivate.h" |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 10 | #include "lldb/API/SBThread.h" |
| 11 | |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 12 | #include "lldb/API/SBFileSpec.h" |
| 13 | #include "lldb/API/SBStream.h" |
Jim Ingham | 27a14f1 | 2019-10-03 22:50:18 +0000 | [diff] [blame] | 14 | #include "lldb/API/SBStructuredData.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 15 | #include "lldb/API/SBSymbolContext.h" |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 16 | #include "lldb/Breakpoint/BreakpointLocation.h" |
| 17 | #include "lldb/Core/Debugger.h" |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 18 | #include "lldb/Core/StreamFile.h" |
Jim Ingham | 27a14f1 | 2019-10-03 22:50:18 +0000 | [diff] [blame] | 19 | #include "lldb/Core/StructuredDataImpl.h" |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 20 | #include "lldb/Interpreter/CommandInterpreter.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 21 | #include "lldb/Symbol/CompileUnit.h" |
| 22 | #include "lldb/Symbol/SymbolContext.h" |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 23 | #include "lldb/Target/Process.h" |
| 24 | #include "lldb/Target/Queue.h" |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 25 | #include "lldb/Target/StopInfo.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 26 | #include "lldb/Target/SystemRuntime.h" |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 27 | #include "lldb/Target/Target.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 28 | #include "lldb/Target/Thread.h" |
| 29 | #include "lldb/Target/ThreadPlan.h" |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 30 | #include "lldb/Target/ThreadPlanPython.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 31 | #include "lldb/Target/ThreadPlanStepInRange.h" |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 32 | #include "lldb/Target/ThreadPlanStepInstruction.h" |
| 33 | #include "lldb/Target/ThreadPlanStepOut.h" |
| 34 | #include "lldb/Target/ThreadPlanStepRange.h" |
Pavel Labath | d821c99 | 2018-08-07 11:07:21 +0000 | [diff] [blame] | 35 | #include "lldb/Utility/State.h" |
Zachary Turner | bf9a773 | 2017-02-02 21:39:50 +0000 | [diff] [blame] | 36 | #include "lldb/Utility/Stream.h" |
Pavel Labath | f2a8bcc | 2017-06-27 10:45:31 +0000 | [diff] [blame] | 37 | #include "lldb/Utility/StructuredData.h" |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 38 | |
| 39 | #include "lldb/API/SBAddress.h" |
| 40 | #include "lldb/API/SBDebugger.h" |
| 41 | #include "lldb/API/SBEvent.h" |
| 42 | #include "lldb/API/SBFrame.h" |
| 43 | #include "lldb/API/SBProcess.h" |
| 44 | #include "lldb/API/SBThreadPlan.h" |
| 45 | #include "lldb/API/SBValue.h" |
| 46 | |
Jonas Devlieghere | 796ac80 | 2019-02-11 23:13:08 +0000 | [diff] [blame] | 47 | #include <memory> |
| 48 | |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 49 | using namespace lldb; |
| 50 | using namespace lldb_private; |
| 51 | |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 52 | // Constructors |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 53 | SBThreadPlan::SBThreadPlan() { LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBThreadPlan); } |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 54 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 55 | SBThreadPlan::SBThreadPlan(const ThreadPlanSP &lldb_object_sp) |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 56 | : m_opaque_wp(lldb_object_sp) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 57 | LLDB_RECORD_CONSTRUCTOR(SBThreadPlan, (const lldb::ThreadPlanSP &), |
| 58 | lldb_object_sp); |
| 59 | } |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 60 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 61 | SBThreadPlan::SBThreadPlan(const SBThreadPlan &rhs) |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 62 | : m_opaque_wp(rhs.m_opaque_wp) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 63 | LLDB_RECORD_CONSTRUCTOR(SBThreadPlan, (const lldb::SBThreadPlan &), rhs); |
| 64 | } |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 65 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 66 | SBThreadPlan::SBThreadPlan(lldb::SBThread &sb_thread, const char *class_name) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 67 | LLDB_RECORD_CONSTRUCTOR(SBThreadPlan, (lldb::SBThread &, const char *), |
| 68 | sb_thread, class_name); |
| 69 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 70 | Thread *thread = sb_thread.get(); |
| 71 | if (thread) |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 72 | m_opaque_wp = |
| 73 | std::make_shared<ThreadPlanPython>(*thread, class_name, nullptr); |
Jim Ingham | 27a14f1 | 2019-10-03 22:50:18 +0000 | [diff] [blame] | 74 | } |
| 75 | |
| 76 | SBThreadPlan::SBThreadPlan(lldb::SBThread &sb_thread, const char *class_name, |
| 77 | lldb::SBStructuredData &args_data) { |
| 78 | LLDB_RECORD_CONSTRUCTOR(SBThreadPlan, (lldb::SBThread &, const char *, |
| 79 | SBStructuredData &), |
| 80 | sb_thread, class_name, args_data); |
| 81 | |
| 82 | Thread *thread = sb_thread.get(); |
| 83 | if (thread) |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 84 | m_opaque_wp = std::make_shared<ThreadPlanPython>(*thread, class_name, |
Jim Ingham | 27a14f1 | 2019-10-03 22:50:18 +0000 | [diff] [blame] | 85 | args_data.m_impl_up.get()); |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 86 | } |
| 87 | |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 88 | // Assignment operator |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 89 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 90 | const lldb::SBThreadPlan &SBThreadPlan::operator=(const SBThreadPlan &rhs) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 91 | LLDB_RECORD_METHOD(const lldb::SBThreadPlan &, |
| 92 | SBThreadPlan, operator=,(const lldb::SBThreadPlan &), rhs); |
| 93 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 94 | if (this != &rhs) |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 95 | m_opaque_wp = rhs.m_opaque_wp; |
Jonas Devlieghere | 306809f | 2019-04-03 21:31:22 +0000 | [diff] [blame] | 96 | return LLDB_RECORD_RESULT(*this); |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 97 | } |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 98 | // Destructor |
Jonas Devlieghere | 866b7a6 | 2020-02-17 22:57:06 -0800 | [diff] [blame] | 99 | SBThreadPlan::~SBThreadPlan() = default; |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 100 | |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 101 | bool SBThreadPlan::IsValid() const { |
| 102 | LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBThreadPlan, IsValid); |
Pavel Labath | 7f5237b | 2019-03-11 13:58:46 +0000 | [diff] [blame] | 103 | return this->operator bool(); |
| 104 | } |
| 105 | SBThreadPlan::operator bool() const { |
| 106 | LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBThreadPlan, operator bool); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 107 | |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 108 | return static_cast<bool>(GetSP()); |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 109 | } |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 110 | |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 111 | void SBThreadPlan::Clear() { |
| 112 | LLDB_RECORD_METHOD_NO_ARGS(void, SBThreadPlan, Clear); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 113 | |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 114 | m_opaque_wp.reset(); |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 115 | } |
| 116 | |
| 117 | lldb::StopReason SBThreadPlan::GetStopReason() { |
| 118 | LLDB_RECORD_METHOD_NO_ARGS(lldb::StopReason, SBThreadPlan, GetStopReason); |
| 119 | |
| 120 | return eStopReasonNone; |
| 121 | } |
| 122 | |
| 123 | size_t SBThreadPlan::GetStopReasonDataCount() { |
| 124 | LLDB_RECORD_METHOD_NO_ARGS(size_t, SBThreadPlan, GetStopReasonDataCount); |
| 125 | |
| 126 | return 0; |
| 127 | } |
| 128 | |
| 129 | uint64_t SBThreadPlan::GetStopReasonDataAtIndex(uint32_t idx) { |
| 130 | LLDB_RECORD_METHOD(uint64_t, SBThreadPlan, GetStopReasonDataAtIndex, |
| 131 | (uint32_t), idx); |
| 132 | |
| 133 | return 0; |
| 134 | } |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 135 | |
| 136 | SBThread SBThreadPlan::GetThread() const { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 137 | LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBThread, SBThreadPlan, GetThread); |
| 138 | |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 139 | ThreadPlanSP thread_plan_sp(GetSP()); |
| 140 | if (thread_plan_sp) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 141 | return LLDB_RECORD_RESULT( |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 142 | SBThread(thread_plan_sp->GetThread().shared_from_this())); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 143 | } else |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 144 | return LLDB_RECORD_RESULT(SBThread()); |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 145 | } |
| 146 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 147 | bool SBThreadPlan::GetDescription(lldb::SBStream &description) const { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 148 | LLDB_RECORD_METHOD_CONST(bool, SBThreadPlan, GetDescription, |
| 149 | (lldb::SBStream &), description); |
| 150 | |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 151 | ThreadPlanSP thread_plan_sp(GetSP()); |
| 152 | if (thread_plan_sp) { |
| 153 | thread_plan_sp->GetDescription(description.get(), eDescriptionLevelFull); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 154 | } else { |
| 155 | description.Printf("Empty SBThreadPlan"); |
| 156 | } |
| 157 | return true; |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 158 | } |
| 159 | |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 160 | void SBThreadPlan::SetThreadPlan(const ThreadPlanSP &lldb_object_wp) { |
| 161 | m_opaque_wp = lldb_object_wp; |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 162 | } |
| 163 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 164 | void SBThreadPlan::SetPlanComplete(bool success) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 165 | LLDB_RECORD_METHOD(void, SBThreadPlan, SetPlanComplete, (bool), success); |
| 166 | |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 167 | ThreadPlanSP thread_plan_sp(GetSP()); |
| 168 | if (thread_plan_sp) |
| 169 | thread_plan_sp->SetPlanComplete(success); |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 170 | } |
| 171 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 172 | bool SBThreadPlan::IsPlanComplete() { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 173 | LLDB_RECORD_METHOD_NO_ARGS(bool, SBThreadPlan, IsPlanComplete); |
| 174 | |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 175 | ThreadPlanSP thread_plan_sp(GetSP()); |
| 176 | if (thread_plan_sp) |
| 177 | return thread_plan_sp->IsPlanComplete(); |
| 178 | return true; |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 179 | } |
| 180 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 181 | bool SBThreadPlan::IsPlanStale() { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 182 | LLDB_RECORD_METHOD_NO_ARGS(bool, SBThreadPlan, IsPlanStale); |
| 183 | |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 184 | ThreadPlanSP thread_plan_sp(GetSP()); |
| 185 | if (thread_plan_sp) |
| 186 | return thread_plan_sp->IsPlanStale(); |
| 187 | return true; |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 188 | } |
| 189 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 190 | bool SBThreadPlan::IsValid() { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 191 | LLDB_RECORD_METHOD_NO_ARGS(bool, SBThreadPlan, IsValid); |
| 192 | |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 193 | ThreadPlanSP thread_plan_sp(GetSP()); |
| 194 | if (thread_plan_sp) |
| 195 | return thread_plan_sp->ValidatePlan(nullptr); |
| 196 | return false; |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 197 | } |
| 198 | |
Jim Ingham | d3dfd8c | 2020-08-07 14:44:01 -0700 | [diff] [blame] | 199 | bool SBThreadPlan::GetStopOthers() { |
| 200 | LLDB_RECORD_METHOD_NO_ARGS(bool, SBThreadPlan, GetStopOthers); |
| 201 | |
| 202 | ThreadPlanSP thread_plan_sp(GetSP()); |
| 203 | if (thread_plan_sp) |
| 204 | return thread_plan_sp->StopOthers(); |
| 205 | return false; |
| 206 | } |
| 207 | |
| 208 | void SBThreadPlan::SetStopOthers(bool stop_others) { |
| 209 | LLDB_RECORD_METHOD(void, SBThreadPlan, SetStopOthers, (bool), stop_others); |
| 210 | |
| 211 | ThreadPlanSP thread_plan_sp(GetSP()); |
| 212 | if (thread_plan_sp) |
| 213 | thread_plan_sp->SetStopOthers(stop_others); |
| 214 | } |
| 215 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 216 | // This section allows an SBThreadPlan to push another of the common types of |
| 217 | // plans... |
| 218 | // |
| 219 | // FIXME, you should only be able to queue thread plans from inside the methods |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 220 | // of a Scripted Thread Plan. Need a way to enforce that. |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 221 | |
| 222 | SBThreadPlan |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 223 | SBThreadPlan::QueueThreadPlanForStepOverRange(SBAddress &sb_start_address, |
| 224 | lldb::addr_t size) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 225 | LLDB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 226 | QueueThreadPlanForStepOverRange, |
| 227 | (lldb::SBAddress &, lldb::addr_t), sb_start_address, size); |
| 228 | |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 229 | SBError error; |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 230 | return LLDB_RECORD_RESULT( |
| 231 | QueueThreadPlanForStepOverRange(sb_start_address, size, error)); |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 232 | } |
| 233 | |
| 234 | SBThreadPlan SBThreadPlan::QueueThreadPlanForStepOverRange( |
| 235 | SBAddress &sb_start_address, lldb::addr_t size, SBError &error) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 236 | LLDB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 237 | QueueThreadPlanForStepOverRange, |
| 238 | (lldb::SBAddress &, lldb::addr_t, lldb::SBError &), |
| 239 | sb_start_address, size, error); |
| 240 | |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 241 | ThreadPlanSP thread_plan_sp(GetSP()); |
| 242 | if (thread_plan_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 243 | Address *start_address = sb_start_address.get(); |
| 244 | if (!start_address) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 245 | return LLDB_RECORD_RESULT(SBThreadPlan()); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 246 | } |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 247 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 248 | AddressRange range(*start_address, size); |
| 249 | SymbolContext sc; |
| 250 | start_address->CalculateSymbolContext(&sc); |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 251 | Status plan_status; |
| 252 | |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 253 | SBThreadPlan plan = SBThreadPlan( |
| 254 | thread_plan_sp->GetThread().QueueThreadPlanForStepOverRange( |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 255 | false, range, sc, eAllThreads, plan_status)); |
| 256 | |
| 257 | if (plan_status.Fail()) |
| 258 | error.SetErrorString(plan_status.AsCString()); |
Jim Ingham | f7de4b5 | 2020-04-10 15:37:05 -0700 | [diff] [blame] | 259 | else |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 260 | plan.GetSP()->SetPrivate(true); |
| 261 | |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 262 | return LLDB_RECORD_RESULT(plan); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 263 | } |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 264 | return LLDB_RECORD_RESULT(SBThreadPlan()); |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 265 | } |
| 266 | |
| 267 | SBThreadPlan |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 268 | SBThreadPlan::QueueThreadPlanForStepInRange(SBAddress &sb_start_address, |
| 269 | lldb::addr_t size) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 270 | LLDB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 271 | QueueThreadPlanForStepInRange, |
| 272 | (lldb::SBAddress &, lldb::addr_t), sb_start_address, size); |
| 273 | |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 274 | SBError error; |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 275 | return LLDB_RECORD_RESULT( |
| 276 | QueueThreadPlanForStepInRange(sb_start_address, size, error)); |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 277 | } |
| 278 | |
| 279 | SBThreadPlan |
| 280 | SBThreadPlan::QueueThreadPlanForStepInRange(SBAddress &sb_start_address, |
| 281 | lldb::addr_t size, SBError &error) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 282 | LLDB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 283 | QueueThreadPlanForStepInRange, |
| 284 | (lldb::SBAddress &, lldb::addr_t, lldb::SBError &), |
| 285 | sb_start_address, size, error); |
| 286 | |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 287 | ThreadPlanSP thread_plan_sp(GetSP()); |
| 288 | if (thread_plan_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 289 | Address *start_address = sb_start_address.get(); |
| 290 | if (!start_address) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 291 | return LLDB_RECORD_RESULT(SBThreadPlan()); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 292 | } |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 293 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 294 | AddressRange range(*start_address, size); |
| 295 | SymbolContext sc; |
| 296 | start_address->CalculateSymbolContext(&sc); |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 297 | |
| 298 | Status plan_status; |
| 299 | SBThreadPlan plan = |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 300 | SBThreadPlan(thread_plan_sp->GetThread().QueueThreadPlanForStepInRange( |
Konrad Kleine | 248a130 | 2019-05-23 11:14:47 +0000 | [diff] [blame] | 301 | false, range, sc, nullptr, eAllThreads, plan_status)); |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 302 | |
| 303 | if (plan_status.Fail()) |
| 304 | error.SetErrorString(plan_status.AsCString()); |
Jim Ingham | f7de4b5 | 2020-04-10 15:37:05 -0700 | [diff] [blame] | 305 | else |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 306 | plan.GetSP()->SetPrivate(true); |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 307 | |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 308 | return LLDB_RECORD_RESULT(plan); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 309 | } |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 310 | return LLDB_RECORD_RESULT(SBThreadPlan()); |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 311 | } |
| 312 | |
| 313 | SBThreadPlan |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 314 | SBThreadPlan::QueueThreadPlanForStepOut(uint32_t frame_idx_to_step_to, |
| 315 | bool first_insn) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 316 | LLDB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 317 | QueueThreadPlanForStepOut, (uint32_t, bool), |
| 318 | frame_idx_to_step_to, first_insn); |
| 319 | |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 320 | SBError error; |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 321 | return LLDB_RECORD_RESULT( |
| 322 | QueueThreadPlanForStepOut(frame_idx_to_step_to, first_insn, error)); |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 323 | } |
| 324 | |
| 325 | SBThreadPlan |
| 326 | SBThreadPlan::QueueThreadPlanForStepOut(uint32_t frame_idx_to_step_to, |
| 327 | bool first_insn, SBError &error) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 328 | LLDB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 329 | QueueThreadPlanForStepOut, |
| 330 | (uint32_t, bool, lldb::SBError &), frame_idx_to_step_to, |
| 331 | first_insn, error); |
| 332 | |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 333 | ThreadPlanSP thread_plan_sp(GetSP()); |
| 334 | if (thread_plan_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 335 | SymbolContext sc; |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 336 | sc = thread_plan_sp->GetThread().GetStackFrameAtIndex(0)->GetSymbolContext( |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 337 | lldb::eSymbolContextEverything); |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 338 | |
| 339 | Status plan_status; |
| 340 | SBThreadPlan plan = |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 341 | SBThreadPlan(thread_plan_sp->GetThread().QueueThreadPlanForStepOut( |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 342 | false, &sc, first_insn, false, eVoteYes, eVoteNoOpinion, |
| 343 | frame_idx_to_step_to, plan_status)); |
| 344 | |
| 345 | if (plan_status.Fail()) |
| 346 | error.SetErrorString(plan_status.AsCString()); |
Jim Ingham | f7de4b5 | 2020-04-10 15:37:05 -0700 | [diff] [blame] | 347 | else |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 348 | plan.GetSP()->SetPrivate(true); |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 349 | |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 350 | return LLDB_RECORD_RESULT(plan); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 351 | } |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 352 | return LLDB_RECORD_RESULT(SBThreadPlan()); |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 353 | } |
| 354 | |
| 355 | SBThreadPlan |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 356 | SBThreadPlan::QueueThreadPlanForRunToAddress(SBAddress sb_address) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 357 | LLDB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 358 | QueueThreadPlanForRunToAddress, (lldb::SBAddress), |
| 359 | sb_address); |
| 360 | |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 361 | SBError error; |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 362 | return LLDB_RECORD_RESULT(QueueThreadPlanForRunToAddress(sb_address, error)); |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 363 | } |
| 364 | |
| 365 | SBThreadPlan SBThreadPlan::QueueThreadPlanForRunToAddress(SBAddress sb_address, |
| 366 | SBError &error) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 367 | LLDB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 368 | QueueThreadPlanForRunToAddress, |
| 369 | (lldb::SBAddress, lldb::SBError &), sb_address, error); |
| 370 | |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 371 | ThreadPlanSP thread_plan_sp(GetSP()); |
| 372 | if (thread_plan_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 373 | Address *address = sb_address.get(); |
| 374 | if (!address) |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 375 | return LLDB_RECORD_RESULT(SBThreadPlan()); |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 376 | |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 377 | Status plan_status; |
| 378 | SBThreadPlan plan = |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 379 | SBThreadPlan(thread_plan_sp->GetThread().QueueThreadPlanForRunToAddress( |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 380 | false, *address, false, plan_status)); |
| 381 | |
| 382 | if (plan_status.Fail()) |
| 383 | error.SetErrorString(plan_status.AsCString()); |
Jim Ingham | f7de4b5 | 2020-04-10 15:37:05 -0700 | [diff] [blame] | 384 | else |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 385 | plan.GetSP()->SetPrivate(true); |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 386 | |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 387 | return LLDB_RECORD_RESULT(plan); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 388 | } |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 389 | return LLDB_RECORD_RESULT(SBThreadPlan()); |
Jim Ingham | 2bdbfd5 | 2014-09-29 23:17:18 +0000 | [diff] [blame] | 390 | } |
Aleksandr Urakov | c1c0fac | 2018-10-25 08:27:42 +0000 | [diff] [blame] | 391 | |
| 392 | SBThreadPlan |
| 393 | SBThreadPlan::QueueThreadPlanForStepScripted(const char *script_class_name) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 394 | LLDB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 395 | QueueThreadPlanForStepScripted, (const char *), |
| 396 | script_class_name); |
| 397 | |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 398 | SBError error; |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 399 | return LLDB_RECORD_RESULT( |
| 400 | QueueThreadPlanForStepScripted(script_class_name, error)); |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 401 | } |
| 402 | |
| 403 | SBThreadPlan |
| 404 | SBThreadPlan::QueueThreadPlanForStepScripted(const char *script_class_name, |
| 405 | SBError &error) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 406 | LLDB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 407 | QueueThreadPlanForStepScripted, |
| 408 | (const char *, lldb::SBError &), script_class_name, error); |
| 409 | |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 410 | ThreadPlanSP thread_plan_sp(GetSP()); |
| 411 | if (thread_plan_sp) { |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 412 | Status plan_status; |
Jim Ingham | 27a14f1 | 2019-10-03 22:50:18 +0000 | [diff] [blame] | 413 | StructuredData::ObjectSP empty_args; |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 414 | SBThreadPlan plan = |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 415 | SBThreadPlan(thread_plan_sp->GetThread().QueueThreadPlanForStepScripted( |
Jim Ingham | 27a14f1 | 2019-10-03 22:50:18 +0000 | [diff] [blame] | 416 | false, script_class_name, empty_args, false, plan_status)); |
| 417 | |
| 418 | if (plan_status.Fail()) |
| 419 | error.SetErrorString(plan_status.AsCString()); |
Jim Ingham | f7de4b5 | 2020-04-10 15:37:05 -0700 | [diff] [blame] | 420 | else |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 421 | plan.GetSP()->SetPrivate(true); |
Jim Ingham | 27a14f1 | 2019-10-03 22:50:18 +0000 | [diff] [blame] | 422 | |
| 423 | return LLDB_RECORD_RESULT(plan); |
Jim Ingham | 27a14f1 | 2019-10-03 22:50:18 +0000 | [diff] [blame] | 424 | } |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 425 | return LLDB_RECORD_RESULT(SBThreadPlan()); |
Jim Ingham | 27a14f1 | 2019-10-03 22:50:18 +0000 | [diff] [blame] | 426 | } |
| 427 | |
| 428 | SBThreadPlan |
| 429 | SBThreadPlan::QueueThreadPlanForStepScripted(const char *script_class_name, |
| 430 | lldb::SBStructuredData &args_data, |
| 431 | SBError &error) { |
| 432 | LLDB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 433 | QueueThreadPlanForStepScripted, |
| 434 | (const char *, lldb::SBStructuredData &, lldb::SBError &), |
| 435 | script_class_name, args_data, error); |
| 436 | |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 437 | ThreadPlanSP thread_plan_sp(GetSP()); |
| 438 | if (thread_plan_sp) { |
Jim Ingham | 27a14f1 | 2019-10-03 22:50:18 +0000 | [diff] [blame] | 439 | Status plan_status; |
| 440 | StructuredData::ObjectSP args_obj = args_data.m_impl_up->GetObjectSP(); |
| 441 | SBThreadPlan plan = |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 442 | SBThreadPlan(thread_plan_sp->GetThread().QueueThreadPlanForStepScripted( |
Jim Ingham | 27a14f1 | 2019-10-03 22:50:18 +0000 | [diff] [blame] | 443 | false, script_class_name, args_obj, false, plan_status)); |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 444 | |
| 445 | if (plan_status.Fail()) |
| 446 | error.SetErrorString(plan_status.AsCString()); |
Jim Ingham | f7de4b5 | 2020-04-10 15:37:05 -0700 | [diff] [blame] | 447 | else |
Jonas Devlieghere | 2ba7ce401e | 2020-07-20 16:50:59 -0700 | [diff] [blame] | 448 | plan.GetSP()->SetPrivate(true); |
Jonas Devlieghere | e103ae9 | 2018-11-15 01:18:15 +0000 | [diff] [blame] | 449 | |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 450 | return LLDB_RECORD_RESULT(plan); |
Aleksandr Urakov | c1c0fac | 2018-10-25 08:27:42 +0000 | [diff] [blame] | 451 | } else { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 452 | return LLDB_RECORD_RESULT(SBThreadPlan()); |
Aleksandr Urakov | c1c0fac | 2018-10-25 08:27:42 +0000 | [diff] [blame] | 453 | } |
| 454 | } |
Michal Gorny | ae211ec | 2019-03-19 17:13:13 +0000 | [diff] [blame] | 455 | |
| 456 | namespace lldb_private { |
| 457 | namespace repro { |
| 458 | |
| 459 | template <> |
| 460 | void RegisterMethods<SBThreadPlan>(Registry &R) { |
| 461 | LLDB_REGISTER_CONSTRUCTOR(SBThreadPlan, ()); |
| 462 | LLDB_REGISTER_CONSTRUCTOR(SBThreadPlan, (const lldb::ThreadPlanSP &)); |
| 463 | LLDB_REGISTER_CONSTRUCTOR(SBThreadPlan, (const lldb::SBThreadPlan &)); |
| 464 | LLDB_REGISTER_CONSTRUCTOR(SBThreadPlan, (lldb::SBThread &, const char *)); |
Jim Ingham | 27a14f1 | 2019-10-03 22:50:18 +0000 | [diff] [blame] | 465 | LLDB_REGISTER_CONSTRUCTOR(SBThreadPlan, (lldb::SBThread &, const char *, |
| 466 | lldb::SBStructuredData &)); |
Michal Gorny | ae211ec | 2019-03-19 17:13:13 +0000 | [diff] [blame] | 467 | LLDB_REGISTER_METHOD(const lldb::SBThreadPlan &, |
| 468 | SBThreadPlan, operator=,(const lldb::SBThreadPlan &)); |
Michal Gorny | ae211ec | 2019-03-19 17:13:13 +0000 | [diff] [blame] | 469 | LLDB_REGISTER_METHOD_CONST(bool, SBThreadPlan, IsValid, ()); |
| 470 | LLDB_REGISTER_METHOD_CONST(bool, SBThreadPlan, operator bool, ()); |
| 471 | LLDB_REGISTER_METHOD(void, SBThreadPlan, Clear, ()); |
| 472 | LLDB_REGISTER_METHOD(lldb::StopReason, SBThreadPlan, GetStopReason, ()); |
| 473 | LLDB_REGISTER_METHOD(size_t, SBThreadPlan, GetStopReasonDataCount, ()); |
| 474 | LLDB_REGISTER_METHOD(uint64_t, SBThreadPlan, GetStopReasonDataAtIndex, |
| 475 | (uint32_t)); |
| 476 | LLDB_REGISTER_METHOD_CONST(lldb::SBThread, SBThreadPlan, GetThread, ()); |
| 477 | LLDB_REGISTER_METHOD_CONST(bool, SBThreadPlan, GetDescription, |
| 478 | (lldb::SBStream &)); |
| 479 | LLDB_REGISTER_METHOD(void, SBThreadPlan, SetPlanComplete, (bool)); |
| 480 | LLDB_REGISTER_METHOD(bool, SBThreadPlan, IsPlanComplete, ()); |
| 481 | LLDB_REGISTER_METHOD(bool, SBThreadPlan, IsPlanStale, ()); |
| 482 | LLDB_REGISTER_METHOD(bool, SBThreadPlan, IsValid, ()); |
Jim Ingham | d3dfd8c | 2020-08-07 14:44:01 -0700 | [diff] [blame] | 483 | LLDB_REGISTER_METHOD(void, SBThreadPlan, SetStopOthers, (bool)); |
| 484 | LLDB_REGISTER_METHOD(bool, SBThreadPlan, GetStopOthers, ()); |
Michal Gorny | ae211ec | 2019-03-19 17:13:13 +0000 | [diff] [blame] | 485 | LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 486 | QueueThreadPlanForStepOverRange, |
| 487 | (lldb::SBAddress &, lldb::addr_t)); |
| 488 | LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 489 | QueueThreadPlanForStepOverRange, |
| 490 | (lldb::SBAddress &, lldb::addr_t, lldb::SBError &)); |
| 491 | LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 492 | QueueThreadPlanForStepInRange, |
| 493 | (lldb::SBAddress &, lldb::addr_t)); |
| 494 | LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 495 | QueueThreadPlanForStepInRange, |
| 496 | (lldb::SBAddress &, lldb::addr_t, lldb::SBError &)); |
| 497 | LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 498 | QueueThreadPlanForStepOut, (uint32_t, bool)); |
| 499 | LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 500 | QueueThreadPlanForStepOut, |
| 501 | (uint32_t, bool, lldb::SBError &)); |
| 502 | LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 503 | QueueThreadPlanForRunToAddress, (lldb::SBAddress)); |
| 504 | LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 505 | QueueThreadPlanForRunToAddress, |
| 506 | (lldb::SBAddress, lldb::SBError &)); |
| 507 | LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 508 | QueueThreadPlanForStepScripted, (const char *)); |
| 509 | LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 510 | QueueThreadPlanForStepScripted, |
| 511 | (const char *, lldb::SBError &)); |
Jim Ingham | 27a14f1 | 2019-10-03 22:50:18 +0000 | [diff] [blame] | 512 | LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan, |
| 513 | QueueThreadPlanForStepScripted, |
| 514 | (const char *, lldb::SBStructuredData &, |
| 515 | lldb::SBError &)); |
Michal Gorny | ae211ec | 2019-03-19 17:13:13 +0000 | [diff] [blame] | 516 | } |
| 517 | |
| 518 | } |
| 519 | } |