LLDB mainline
ThreadPlanStepOut.cpp
Go to the documentation of this file.
1//===-- ThreadPlanStepOut.cpp ---------------------------------------------===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8
11#include "lldb/Core/Value.h"
12#include "lldb/Symbol/Block.h"
14#include "lldb/Symbol/Symbol.h"
15#include "lldb/Symbol/Type.h"
16#include "lldb/Target/ABI.h"
18#include "lldb/Target/Process.h"
21#include "lldb/Target/Target.h"
25#include "lldb/Utility/Log.h"
27
28#include <memory>
29
30using namespace lldb;
31using namespace lldb_private;
32
35
36/// Computes the target frame this plan should step out to.
37static StackFrameSP
38ComputeTargetFrame(Thread &thread, uint32_t start_frame_idx,
39 std::vector<StackFrameSP> &skipped_frames) {
40 uint32_t frame_idx = start_frame_idx + 1;
41 StackFrameSP return_frame_sp = thread.GetStackFrameAtIndex(frame_idx);
42 if (!return_frame_sp)
43 return nullptr;
44
45 while (return_frame_sp->IsArtificial() || return_frame_sp->IsHidden()) {
46 skipped_frames.push_back(return_frame_sp);
47
48 frame_idx++;
49 return_frame_sp = thread.GetStackFrameAtIndex(frame_idx);
50
51 // We never expect to see an artificial frame without a regular ancestor.
52 // Defensively refuse to step out.
53 if (!return_frame_sp) {
55 "Can't step out of frame with artificial ancestors");
56 return nullptr;
57 }
58 }
59 return return_frame_sp;
60}
61
62// ThreadPlanStepOut: Step out of the current frame
64 Thread &thread, SymbolContext *context, bool first_insn, bool stop_others,
65 Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx,
66 LazyBool step_out_avoids_code_without_debug_info,
67 bool continue_to_next_branch, bool gather_return_value)
68 : ThreadPlan(ThreadPlan::eKindStepOut, "Step out", thread, report_stop_vote,
69 report_run_vote),
74 m_calculate_return_value(gather_return_value) {
76 SetupAvoidNoDebug(step_out_avoids_code_without_debug_info);
77
78 m_step_from_insn = thread.GetRegisterContext()->GetPC(0);
79
80 StackFrameSP return_frame_sp =
81 ComputeTargetFrame(thread, frame_idx, m_stepped_past_frames);
82 StackFrameSP immediate_return_from_sp(thread.GetStackFrameAtIndex(frame_idx));
83
84 SetupReturnAddress(return_frame_sp, immediate_return_from_sp, frame_idx,
85 continue_to_next_branch);
86}
87
89 Vote report_stop_vote,
90 Vote report_run_vote, uint32_t frame_idx,
91 bool continue_to_next_branch,
92 bool gather_return_value)
93 : ThreadPlan(ThreadPlan::eKindStepOut, "Step out", thread, report_stop_vote,
94 report_run_vote),
98 m_calculate_return_value(gather_return_value) {
100 m_step_from_insn = thread.GetRegisterContext()->GetPC(0);
101
102 StackFrameSP return_frame_sp = thread.GetStackFrameAtIndex(frame_idx + 1);
103 StackFrameSP immediate_return_from_sp =
104 thread.GetStackFrameAtIndex(frame_idx);
105
106 SetupReturnAddress(return_frame_sp, immediate_return_from_sp, frame_idx,
107 continue_to_next_branch);
108}
109
111 StackFrameSP return_frame_sp, StackFrameSP immediate_return_from_sp,
112 uint32_t frame_idx, bool continue_to_next_branch) {
113 if (!return_frame_sp || !immediate_return_from_sp)
114 return; // we can't do anything here. ValidatePlan() will return false.
115
116 m_step_out_to_id = return_frame_sp->GetStackID();
117 m_immediate_step_from_id = immediate_return_from_sp->GetStackID();
118
119 // If the frame directly below the one we are returning to is inlined, we
120 // have to be a little more careful. It is non-trivial to determine the real
121 // "return code address" for an inlined frame, so we have to work our way to
122 // that frame and then step out.
123 if (immediate_return_from_sp->IsInlined()) {
124 if (frame_idx > 0) {
125 // First queue a plan that gets us to this inlined frame, and when we get
126 // there we'll queue a second plan that walks us out of this frame.
127 m_step_out_to_inline_plan_sp = std::make_shared<ThreadPlanStepOut>(
128 GetThread(), nullptr, false, m_stop_others, eVoteNoOpinion,
129 eVoteNoOpinion, frame_idx - 1, eLazyBoolNo, continue_to_next_branch);
131 ->SetShouldStopHereCallbacks(nullptr, nullptr);
132 m_step_out_to_inline_plan_sp->SetPrivate(true);
133 } else {
134 // If we're already at the inlined frame we're stepping through, then
135 // just do that now.
137 }
138 } else {
139 // Find the return address and set a breakpoint there:
140 // FIXME - can we do this more securely if we know first_insn?
141
142 Address return_address(return_frame_sp->GetFrameCodeAddress());
143 if (continue_to_next_branch) {
144 SymbolContext return_address_sc;
145 AddressRange range;
146 Address return_address_decr_pc = return_address;
147 if (return_address_decr_pc.GetOffset() > 0)
148 return_address_decr_pc.Slide(-1);
149
150 return_address_decr_pc.CalculateSymbolContext(
151 &return_address_sc, lldb::eSymbolContextLineEntry);
152 if (return_address_sc.line_entry.IsValid()) {
153 const bool include_inlined_functions = false;
154 range = return_address_sc.line_entry.GetSameLineContiguousAddressRange(
155 include_inlined_functions);
156 if (range.GetByteSize() > 0) {
157 return_address = m_process.AdvanceAddressToNextBranchInstruction(
158 return_address, range);
159 }
160 }
161 }
162 m_return_addr = return_address.GetLoadAddress(&m_process.GetTarget());
163
165 return;
166
167 // Perform some additional validation on the return address.
168 uint32_t permissions = 0;
169 Log *log = GetLog(LLDBLog::Step);
170 if (!m_process.GetLoadAddressPermissions(m_return_addr, permissions)) {
171 LLDB_LOGF(log, "ThreadPlanStepOut(%p): Return address (0x%" PRIx64
172 ") permissions not found.", static_cast<void *>(this),
174 } else if (!(permissions & ePermissionsExecutable)) {
175 m_constructor_errors.Printf("Return address (0x%" PRIx64
176 ") did not point to executable memory.",
178 LLDB_LOGF(log, "ThreadPlanStepOut(%p): %s", static_cast<void *>(this),
179 m_constructor_errors.GetData());
180 return;
181 }
182
183 Breakpoint *return_bp =
184 GetTarget().CreateBreakpoint(m_return_addr, true, false).get();
185
186 if (return_bp != nullptr) {
187 if (return_bp->IsHardware() && !return_bp->HasResolvedLocations())
189 return_bp->SetThreadID(m_tid);
190 m_return_bp_id = return_bp->GetID();
191 return_bp->SetBreakpointKind("step-out");
192 }
193
194 if (immediate_return_from_sp) {
195 const SymbolContext &sc =
196 immediate_return_from_sp->GetSymbolContext(eSymbolContextFunction);
197 if (sc.function) {
199 }
200 }
201 }
202
203 // Record where the language runtime will find an error thrown by the
204 // function. The runtime has to look at the function before it returns, so
205 // this only works when stepping out of frame 0.
206 if (frame_idx != 0)
207 return;
208
210 LanguageRuntime::ThrownErrorLocation(GetThread().GetStackFrameAtIndex(0));
211}
212
214 LazyBool step_out_avoids_code_without_debug_info) {
215 bool avoid_nodebug = true;
216 switch (step_out_avoids_code_without_debug_info) {
217 case eLazyBoolYes:
218 avoid_nodebug = true;
219 break;
220 case eLazyBoolNo:
221 avoid_nodebug = false;
222 break;
224 avoid_nodebug = GetThread().GetStepOutAvoidsNoDebug();
225 break;
226 }
227 if (avoid_nodebug)
229 else
231}
232
234 Thread &thread = GetThread();
236 thread.QueueThreadPlan(m_step_out_to_inline_plan_sp, false);
238 thread.QueueThreadPlan(m_step_through_inline_plan_sp, false);
239}
240
245
248 if (level == lldb::eDescriptionLevelBrief)
249 s->PutCString("step out");
250 else {
252 s->PutCString("Stepping out to inlined frame so we can walk through it.");
254 s->PutCString("Stepping out by stepping through inlined function.");
255 else {
256 s->PutCString("Stepping out from ");
257 Address tmp_address;
258 if (tmp_address.SetLoadAddress(m_step_from_insn, &GetTarget())) {
261 } else {
262 s->Printf("address 0x%" PRIx64 "", (uint64_t)m_step_from_insn);
263 }
264
265 // FIXME: find some useful way to present the m_return_id, since there may
266 // be multiple copies of the
267 // same function on the stack.
268
269 s->PutCString(" returning to frame at ");
270 if (tmp_address.SetLoadAddress(m_return_addr, &GetTarget())) {
273 } else {
274 s->Printf("address 0x%" PRIx64 "", (uint64_t)m_return_addr);
275 }
276
277 if (level == eDescriptionLevelVerbose)
278 s->Printf(" using breakpoint site %d", m_return_bp_id);
279 }
280 }
281
282 if (m_stepped_past_frames.empty())
283 return;
284
285 s->PutCString("\n");
286 for (StackFrameSP frame_sp : m_stepped_past_frames) {
287 s->PutCString("Stepped out past: ");
288 frame_sp->DumpUsingSettingsFormat(s);
289 }
290}
291
294 return m_step_out_to_inline_plan_sp->ValidatePlan(error);
295
297 return m_step_through_inline_plan_sp->ValidatePlan(error);
298
300 if (error)
301 error->PutCString(
302 "Could not create hardware breakpoint for thread plan.");
303 return false;
304 }
305
307 if (error) {
308 error->PutCString("Could not create return address breakpoint.");
309 if (m_constructor_errors.GetSize() > 0) {
310 error->PutCString(" ");
311 error->PutCString(m_constructor_errors.GetString());
312 }
313 }
314 return false;
315 }
316
317 return true;
318}
319
321 // If the step out plan is done, then we just need to step through the
322 // inlined frame.
324 return m_step_out_to_inline_plan_sp->MischiefManaged();
326 if (m_step_through_inline_plan_sp->MischiefManaged()) {
329 return true;
330 } else
331 return false;
332 } else if (m_step_out_further_plan_sp) {
333 return m_step_out_further_plan_sp->MischiefManaged();
334 }
335
336 // We don't explain signals or breakpoints (breakpoints that handle stepping
337 // in or out will be handled by a child plan.
338
339 StopInfoSP stop_info_sp = GetPrivateStopInfo();
340 if (stop_info_sp) {
341 StopReason reason = stop_info_sp->GetStopReason();
342 if (reason == eStopReasonBreakpoint) {
343 // If this is OUR breakpoint, we're fine, otherwise we don't know why
344 // this happened...
345 BreakpointSiteSP site_sp(
346 m_process.GetBreakpointSiteList().FindByID(stop_info_sp->GetValue()));
347 if (site_sp && site_sp->IsBreakpointAtThisSite(m_return_bp_id)) {
348 bool done;
349
350 StackID frame_zero_id =
351 GetThread().GetStackFrameAtIndex(0)->GetStackID();
352
353 if (m_step_out_to_id == frame_zero_id)
354 done = true;
355 else if (m_step_out_to_id.IsYoungerThan(frame_zero_id, m_process)) {
356 // Either we stepped past the breakpoint, or the stack ID calculation
357 // was incorrect and we should probably stop.
358 done = true;
359 } else {
360 done = (m_immediate_step_from_id.IsYoungerThan(frame_zero_id,
361 m_process));
362 }
363
364 if (done) {
368 }
369 }
370
371 // If the thread also hit a user breakpoint on its way out, the plan is
372 // done but should not claim to explain the stop. It is more important
373 // to report the user breakpoint than the step out completion.
374 if (!site_sp->ContainsUserBreakpointForThread(GetThread()))
375 return true;
376 }
377 return false;
378 } else if (IsUsuallyUnexplainedStopReason(reason))
379 return false;
380 else
381 return true;
382 }
383 return true;
384}
385
387 if (IsPlanComplete())
388 return true;
389
390 bool done = false;
392 if (m_step_out_to_inline_plan_sp->MischiefManaged()) {
394 // Now step through the inlined stack we are in:
395 if (QueueInlinedStepPlan(true))
396 return false;
397 // If we can't queue a plan to do this, then just call ourselves done.
398 done = true;
399 } else
400 return m_step_out_to_inline_plan_sp->ShouldStop(event_ptr);
402 if (m_step_through_inline_plan_sp->MischiefManaged())
403 done = true;
404 else
405 return m_step_through_inline_plan_sp->ShouldStop(event_ptr);
406 } else if (m_step_out_further_plan_sp) {
407 if (m_step_out_further_plan_sp->MischiefManaged()) {
409 done = true;
410 } else
411 return m_step_out_further_plan_sp->ShouldStop(event_ptr);
412 }
413
414 if (!done) {
415 StopInfoSP stop_info_sp = GetPrivateStopInfo();
416 if (stop_info_sp && stop_info_sp->GetStopReason() == eStopReasonBreakpoint) {
417 StackID frame_zero_id = GetThread().GetStackFrameAtIndex(0)->GetStackID();
418 done = !(frame_zero_id.IsYoungerThan(m_step_out_to_id, m_process));
419 }
420 }
421
422 // The normal step out computations think we are done, so all we need to do
423 // is consult the ShouldStopHere, and we are done.
424
425 if (done) {
429 } else {
432 done = false;
433 }
434 }
435
436 return done;
437}
438
440
442
444 bool current_plan) {
446 return true;
447
449 return false;
450
451 if (current_plan) {
453 if (return_bp != nullptr)
454 return_bp->SetEnabled(true);
455 }
456 return true;
457}
458
462 if (return_bp != nullptr)
463 return_bp->SetEnabled(false);
464 }
465
466 return true;
467}
468
470 if (IsPlanComplete()) {
471 // Did I reach my breakpoint? If so I'm done.
472 //
473 // I also check the stack depth, since if we've blown past the breakpoint
474 // for some
475 // reason and we're now stopping for some other reason altogether, then
476 // we're done with this step out operation.
477
478 Log *log = GetLog(LLDBLog::Step);
479 LLDB_LOGF(log, "Completed step out plan.");
483 }
484
486 return true;
487 } else {
488 return false;
489 }
490}
491
493 // Now figure out the range of this inlined block, and set up a "step through
494 // range" plan for that. If we've been provided with a context, then use the
495 // block in that context.
496 Thread &thread = GetThread();
497 StackFrameSP immediate_return_from_sp(thread.GetStackFrameAtIndex(0));
498 if (!immediate_return_from_sp)
499 return false;
500
501 Log *log = GetLog(LLDBLog::Step);
502 if (log) {
503 StreamString s;
504 immediate_return_from_sp->Dump(&s, true, false);
505 LLDB_LOGF(log, "Queuing inlined frame to step past: %s.", s.GetData());
506 }
507
508 Block *from_block = immediate_return_from_sp->GetFrameBlock();
509 if (from_block) {
510 Block *inlined_block = from_block->GetContainingInlinedBlock();
511 if (inlined_block) {
512 size_t num_ranges = inlined_block->GetNumRanges();
513 AddressRange inline_range;
514 if (inlined_block->GetRangeAtIndex(0, inline_range)) {
515 SymbolContext inlined_sc;
516 inlined_block->CalculateSymbolContext(&inlined_sc);
517 inlined_sc.target_sp = GetTarget().shared_from_this();
518 RunMode run_mode =
520 const LazyBool avoid_no_debug = eLazyBoolNo;
521
523 std::make_shared<ThreadPlanStepOverRange>(
524 thread, inline_range, inlined_sc, run_mode, avoid_no_debug);
525 ThreadPlanStepOverRange *step_through_inline_plan_ptr =
526 static_cast<ThreadPlanStepOverRange *>(
528 m_step_through_inline_plan_sp->SetPrivate(true);
529
530 step_through_inline_plan_ptr->SetOkayToDiscard(true);
531 StreamString errors;
532 if (!step_through_inline_plan_ptr->ValidatePlan(&errors)) {
533 // FIXME: Log this failure.
534 delete step_through_inline_plan_ptr;
535 return false;
536 }
537
538 for (size_t i = 1; i < num_ranges; i++) {
539 if (inlined_block->GetRangeAtIndex(i, inline_range))
540 step_through_inline_plan_ptr->AddRange(inline_range);
541 }
542
543 if (queue_now)
544 thread.QueueThreadPlan(m_step_through_inline_plan_sp, false);
545 return true;
546 }
547 }
548 }
549
550 return false;
551}
552
554 if (!std::holds_alternative<std::monostate>(m_return_value))
555 return;
556
558 return;
559
560 if (std::optional<ValueObjectSP> error_sp =
561 m_thrown_error_location.GetThrownError(
562 GetThread().GetStackFrameAtIndex(0))) {
563 m_return_value = ThrownError{*error_sp};
564 return;
565 }
566
567 if (m_immediate_step_from_function != nullptr) {
568 CompilerType return_compiler_type =
569 m_immediate_step_from_function->GetCompilerType()
570 .GetFunctionReturnType();
571 if (return_compiler_type) {
572 // Computing a type's size may require a type from the language runtime.
573 if (LanguageRuntime *runtime = m_process.GetLanguageRuntime(
574 return_compiler_type.GetMinimumLanguage())) {
575 std::optional<CompilerType> runtime_type =
576 runtime->GetRuntimeType(return_compiler_type);
577 if (runtime_type && *runtime_type)
578 return_compiler_type = *runtime_type;
579 }
580 lldb::ABISP abi_sp = m_process.GetABI();
581 if (abi_sp)
582 if (ValueObjectSP valobj_sp =
583 abi_sp->GetReturnValueObject(GetThread(), return_compiler_type))
584 m_return_value = ReturnedValue{valobj_sp};
585 }
586 }
587}
588
590 // If we are still lower on the stack than the frame we are returning to,
591 // then there's something for us to do. Otherwise, we're stale.
592
593 StackID frame_zero_id = GetThread().GetStackFrameAtIndex(0)->GetStackID();
594 return !(frame_zero_id.IsYoungerThan(m_step_out_to_id, m_process));
595}
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
Definition Log.h:375
#define LLDB_LOGF(log,...)
Definition Log.h:389
static StackFrameSP ComputeTargetFrame(Thread &thread, uint32_t start_frame_idx, std::vector< StackFrameSP > &skipped_frames)
Computes the target frame this plan should step out to.
A section + offset based address range class.
lldb::addr_t GetByteSize() const
Get accessor for the byte size of this range.
A section + offset based address class.
Definition Address.h:62
lldb::addr_t GetLoadAddress(Target *target) const
Get the load address.
Definition Address.cpp:303
bool SetLoadAddress(lldb::addr_t load_addr, Target *target, bool allow_section_end=false)
Set the address to represent load_addr.
Definition Address.cpp:1029
uint32_t CalculateSymbolContext(SymbolContext *sc, lldb::SymbolContextItem resolve_scope=lldb::eSymbolContextEverything) const
Reconstruct a symbol context from an address.
Definition Address.cpp:820
@ DumpStyleResolvedDescription
Display the details about what an address resolves to.
Definition Address.h:104
@ DumpStyleLoadAddress
Display as the load address (if resolved).
Definition Address.h:99
bool Slide(int64_t offset)
Definition Address.h:446
bool Dump(Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, DumpStyle fallback_style=DumpStyleInvalid, uint32_t addr_byte_size=UINT32_MAX, bool all_ranges=false, std::optional< Stream::HighlightSettings > settings=std::nullopt) const
Dump a description of this object to a Stream.
Definition Address.cpp:398
lldb::addr_t GetOffset() const
Get the section relative offset value.
Definition Address.h:329
A class that describes a single lexical block.
Definition Block.h:41
void CalculateSymbolContext(SymbolContext *sc) override
Reconstruct the object's symbol context into sc.
Definition Block.cpp:137
Block * GetContainingInlinedBlock()
Get the inlined block that contains this block.
Definition Block.cpp:206
bool GetRangeAtIndex(uint32_t range_idx, AddressRange &range)
Definition Block.cpp:294
size_t GetNumRanges() const
Definition Block.h:322
General Outline: A breakpoint has four main parts, a filter, a resolver, the list of breakpoint locat...
Definition Breakpoint.h:83
void SetBreakpointKind(const char *kind)
Set the "kind" description for a breakpoint.
Definition Breakpoint.h:485
bool HasResolvedLocations() const
Return whether this breakpoint has any resolved locations.
void SetThreadID(lldb::tid_t thread_id)
Set the valid thread to be checked when the breakpoint is hit.
void SetEnabled(bool enable) override
If enable is true, enable the breakpoint, if false disable it.
Generic representation of a type in a programming language.
lldb::LanguageType GetMinimumLanguage()
ValueType Clear(ValueType mask=~static_cast< ValueType >(0))
Clear one or more flags.
Definition Flags.h:61
ValueType Set(ValueType mask)
Set one or more flags by logical OR'ing mask with the current flags.
Definition Flags.h:73
A description of how to find an error thrown by a function.
bool IsYoungerThan(const StackID &other, Process &process) const
Returns true if this StackID corresponds to a frame younger (i.e.
Definition StackID.cpp:78
lldb::break_id_t GetID() const
Definition Stoppoint.cpp:22
const char * GetData() const
A stream class that can stream formatted output to a file.
Definition Stream.h:28
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition Stream.cpp:134
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
Definition Stream.cpp:63
Defines a symbol context baton that can be handed other debug core functions.
Function * function
The Function for a given query.
lldb::TargetSP target_sp
The Target for a given query.
LineEntry line_entry
The LineEntry for a given query.
lldb::BreakpointSP GetBreakpointByID(lldb::break_id_t break_id)
Definition Target.cpp:457
bool RemoveBreakpointByID(lldb::break_id_t break_id)
Definition Target.cpp:1230
lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules, const FileSpec &file, uint32_t line_no, uint32_t column, lldb::addr_t offset, LazyBool check_inlines, LazyBool skip_prologue, bool internal, bool request_hardware, LazyBool move_to_nearest_code)
Definition Target.cpp:528
virtual lldb::ThreadPlanSP QueueStepOutFromHerePlan(Flags &flags, lldb::FrameComparison operation, Status &status)
bool InvokeShouldStopHereCallback(lldb::FrameComparison operation, Status &status)
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
std::vector< lldb::StackFrameSP > m_stepped_past_frames
void SetupReturnAddress(lldb::StackFrameSP return_frame_sp, lldb::StackFrameSP immediate_return_from_sp, uint32_t frame_idx, bool continue_to_next_branch)
ThreadPlanReturnValue m_return_value
bool QueueInlinedStepPlan(bool queue_now)
lldb::StateType GetPlanRunState() override
lldb::ThreadPlanSP m_step_out_further_plan_sp
LanguageRuntime::ThrownErrorLocation m_thrown_error_location
bool DoWillResume(lldb::StateType resume_state, bool current_plan) override
void SetupAvoidNoDebug(LazyBool step_out_avoids_code_without_debug_info)
ThreadPlanStepOut(Thread &thread, SymbolContext *addr_context, bool first_insn, bool stop_others, Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx, LazyBool step_out_avoids_code_without_debug_info, bool continue_to_next_branch=false, bool gather_return_value=true)
Creates a thread plan to step out from frame_idx, skipping parent frames if they are artificial or hi...
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
bool DoPlanExplainsStop(Event *event_ptr) override
lldb::ThreadPlanSP m_step_through_inline_plan_sp
bool ShouldStop(Event *event_ptr) override
lldb::ThreadPlanSP m_step_out_to_inline_plan_sp
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
void AddRange(const AddressRange &new_range)
ThreadPlan(ThreadPlanKind kind, const char *name, Thread &thread, Vote report_stop_vote, Vote report_run_vote)
bool IsUsuallyUnexplainedStopReason(lldb::StopReason)
void SetPlanComplete(bool success=true)
Thread & GetThread()
Returns the Thread that is using this thread plan.
void SetOkayToDiscard(bool value)
Definition ThreadPlan.h:431
virtual bool MischiefManaged()
lldb::StopInfoSP GetPrivateStopInfo()
Definition ThreadPlan.h:548
bool GetStepOutAvoidsNoDebug() const
Definition Thread.cpp:141
virtual lldb::StackFrameSP GetStackFrameAtIndex(uint32_t idx)
Definition Thread.h:451
#define LLDB_INVALID_BREAK_ID
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
Definition Log.h:338
std::shared_ptr< lldb_private::ABI > ABISP
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::BreakpointSite > BreakpointSiteSP
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
@ eDescriptionLevelBrief
@ eDescriptionLevelVerbose
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
StateType
Process and Thread States.
@ eStateRunning
Process or thread is running and can't be examined.
std::shared_ptr< lldb_private::StopInfo > StopInfoSP
StopReason
Thread stop reasons.
@ eStopReasonBreakpoint
RunMode
Thread Run Modes.
AddressRange GetSameLineContiguousAddressRange(bool include_inlined_functions) const
Give the range for this LineEntry + any additional LineEntries for this same source line that are con...
bool IsValid() const
Check if a line entry object is valid.
Definition LineEntry.cpp:35
A value a function returned.
Definition Thread.h:71
An error a function threw instead of returning.
Definition Thread.h:76