LLDB  mainline
ThreadPlanStepRange.cpp
Go to the documentation of this file.
1 //===-- ThreadPlanStepRange.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 
12 #include "lldb/Core/Disassembler.h"
13 #include "lldb/Symbol/Function.h"
14 #include "lldb/Symbol/Symbol.h"
16 #include "lldb/Target/Process.h"
18 #include "lldb/Target/StopInfo.h"
19 #include "lldb/Target/Target.h"
20 #include "lldb/Target/Thread.h"
22 #include "lldb/Utility/Log.h"
23 #include "lldb/Utility/Stream.h"
24 
25 using namespace lldb;
26 using namespace lldb_private;
27 
28 // ThreadPlanStepRange: Step through a stack range, either stepping over or
29 // into based on the value of \a type.
30 
31 ThreadPlanStepRange::ThreadPlanStepRange(ThreadPlanKind kind, const char *name,
32  Thread &thread,
33  const AddressRange &range,
34  const SymbolContext &addr_context,
35  lldb::RunMode stop_others,
36  bool given_ranges_only)
37  : ThreadPlan(kind, name, thread, eVoteNoOpinion, eVoteNoOpinion),
38  m_addr_context(addr_context), m_address_ranges(),
39  m_stop_others(stop_others), m_stack_id(), m_parent_stack_id(),
40  m_no_more_plans(false), m_first_run_event(true), m_use_fast_step(false),
41  m_given_ranges_only(given_ranges_only) {
43  AddRange(range);
44  m_stack_id = thread.GetStackFrameAtIndex(0)->GetStackID();
45  StackFrameSP parent_stack = thread.GetStackFrameAtIndex(1);
46  if (parent_stack)
47  m_parent_stack_id = parent_stack->GetStackID();
48 }
49 
51 
53  // See if we can find a "next range" breakpoint:
55 }
56 
59  if (error)
60  error->PutCString(
61  "Could not create hardware breakpoint for thread plan.");
62  return false;
63  }
64  return true;
65 }
66 
69 
70  const Vote vote = IsPlanComplete() ? eVoteYes : eVoteNo;
71  LLDB_LOGF(log, "ThreadPlanStepRange::ShouldReportStop() returning vote %i\n",
72  vote);
73  return vote;
74 }
75 
77  // For now I'm just adding the ranges. At some point we may want to condense
78  // the ranges if they overlap, though I don't think it is likely to be very
79  // important.
80  m_address_ranges.push_back(new_range);
81 
82  // Fill the slot for this address range with an empty DisassemblerSP in the
83  // instruction ranges. I want the indices to match, but I don't want to do
84  // the work to disassemble this range if I don't step into it.
85  m_instruction_ranges.push_back(DisassemblerSP());
86 }
87 
89  size_t num_ranges = m_address_ranges.size();
90  if (num_ranges == 1) {
92  } else {
93  for (size_t i = 0; i < num_ranges; i++) {
94  s->Printf(" %" PRIu64 ": ", uint64_t(i));
96  }
97  }
98 }
99 
102  bool ret_value = false;
103  Thread &thread = GetThread();
104  lldb::addr_t pc_load_addr = thread.GetRegisterContext()->GetPC();
105 
106  size_t num_ranges = m_address_ranges.size();
107  for (size_t i = 0; i < num_ranges; i++) {
108  ret_value =
109  m_address_ranges[i].ContainsLoadAddress(pc_load_addr, &GetTarget());
110  if (ret_value)
111  break;
112  }
113 
114  if (!ret_value && !m_given_ranges_only) {
115  // See if we've just stepped to another part of the same line number...
116  StackFrame *frame = thread.GetStackFrameAtIndex(0).get();
117 
118  SymbolContext new_context(
119  frame->GetSymbolContext(eSymbolContextEverything));
121  new_context.line_entry.IsValid()) {
123  new_context.line_entry.original_file) {
124  if (m_addr_context.line_entry.line == new_context.line_entry.line) {
125  m_addr_context = new_context;
126  const bool include_inlined_functions =
129  include_inlined_functions));
130  ret_value = true;
131  if (log) {
132  StreamString s;
136 
137  LLDB_LOGF(
138  log,
139  "Step range plan stepped to another range of same line: %s",
140  s.GetData());
141  }
142  } else if (new_context.line_entry.line == 0) {
144  m_addr_context = new_context;
145  const bool include_inlined_functions =
148  include_inlined_functions));
149  ret_value = true;
150  if (log) {
151  StreamString s;
155 
156  LLDB_LOGF(log,
157  "Step range plan stepped to a range at linenumber 0 "
158  "stepping through that range: %s",
159  s.GetData());
160  }
161  } else if (new_context.line_entry.range.GetBaseAddress().GetLoadAddress(
162  &GetTarget()) != pc_load_addr) {
163  // Another thing that sometimes happens here is that we step out of
164  // one line into the MIDDLE of another line. So far I mostly see
165  // this due to bugs in the debug information. But we probably don't
166  // want to be in the middle of a line range, so in that case reset
167  // the stepping range to the line we've stepped into the middle of
168  // and continue.
169  m_addr_context = new_context;
170  m_address_ranges.clear();
172  ret_value = true;
173  if (log) {
174  StreamString s;
178 
179  LLDB_LOGF(log,
180  "Step range plan stepped to the middle of new "
181  "line(%d): %s, continuing to clear this line.",
182  new_context.line_entry.line, s.GetData());
183  }
184  }
185  }
186  }
187  }
188 
189  if (!ret_value && log)
190  LLDB_LOGF(log, "Step range plan out of range to 0x%" PRIx64, pc_load_addr);
191 
192  return ret_value;
193 }
194 
196  lldb::addr_t cur_pc = GetThread().GetRegisterContext()->GetPC();
197  if (m_addr_context.function != nullptr) {
199  cur_pc, &GetTarget());
203  return range.ContainsLoadAddress(cur_pc, &GetTarget());
204  }
205  return false;
206 }
207 
208 // FIXME: This should also handle inlining if we aren't going to do inlining in
209 // the
210 // main stack.
211 //
212 // Ideally we should remember the whole stack frame list, and then compare that
213 // to the current list.
214 
216  FrameComparison frame_order;
217  Thread &thread = GetThread();
218  StackID cur_frame_id = thread.GetStackFrameAtIndex(0)->GetStackID();
219 
220  if (cur_frame_id == m_stack_id) {
221  frame_order = eFrameCompareEqual;
222  } else if (cur_frame_id < m_stack_id) {
223  frame_order = eFrameCompareYounger;
224  } else {
225  StackFrameSP cur_parent_frame = thread.GetStackFrameAtIndex(1);
226  StackID cur_parent_id;
227  if (cur_parent_frame)
228  cur_parent_id = cur_parent_frame->GetStackID();
229  if (m_parent_stack_id.IsValid() && cur_parent_id.IsValid() &&
230  m_parent_stack_id == cur_parent_id)
231  frame_order = eFrameCompareSameParent;
232  else
233  frame_order = eFrameCompareOlder;
234  }
235  return frame_order;
236 }
237 
239  switch (m_stop_others) {
241  return true;
243  // If there is a call in the range of the next branch breakpoint,
244  // then we should always run all threads, since a call can execute
245  // arbitrary code which might for instance take a lock that's held
246  // by another thread.
247  return !m_found_calls;
248  case lldb::eAllThreads:
249  return false;
250  }
251  llvm_unreachable("Unhandled run mode!");
252 }
253 
255  lldb::addr_t addr, size_t &range_index, size_t &insn_offset) {
256  size_t num_ranges = m_address_ranges.size();
257  for (size_t i = 0; i < num_ranges; i++) {
258  if (m_address_ranges[i].ContainsLoadAddress(addr, &GetTarget())) {
259  // Some joker added a zero size range to the stepping range...
260  if (m_address_ranges[i].GetByteSize() == 0)
261  return nullptr;
262 
263  if (!m_instruction_ranges[i]) {
264  // Disassemble the address range given:
265  const char *plugin_name = nullptr;
266  const char *flavor = nullptr;
268  GetTarget().GetArchitecture(), plugin_name, flavor, GetTarget(),
269  m_address_ranges[i]);
270  }
271  if (!m_instruction_ranges[i])
272  return nullptr;
273  else {
274  // Find where we are in the instruction list as well. If we aren't at
275  // an instruction, return nullptr. In this case, we're probably lost,
276  // and shouldn't try to do anything fancy.
277 
278  insn_offset =
280  ->GetInstructionList()
281  .GetIndexOfInstructionAtLoadAddress(addr, GetTarget());
282  if (insn_offset == UINT32_MAX)
283  return nullptr;
284  else {
285  range_index = i;
286  return &m_instruction_ranges[i]->GetInstructionList();
287  }
288  }
289  }
290  }
291  return nullptr;
292 }
293 
295  if (m_next_branch_bp_sp) {
297  LLDB_LOGF(log, "Removing next branch breakpoint: %d.",
298  m_next_branch_bp_sp->GetID());
300  m_next_branch_bp_sp.reset();
302  m_found_calls = false;
303  }
304 }
305 
308  return true;
309 
311  // Stepping through ranges using breakpoints doesn't work yet, but with this
312  // off we fall back to instruction single stepping.
313  if (!m_use_fast_step)
314  return false;
315 
316  // clear the m_found_calls, we'll rediscover it for this range.
317  m_found_calls = false;
318 
319  lldb::addr_t cur_addr = GetThread().GetRegisterContext()->GetPC();
320  // Find the current address in our address ranges, and fetch the disassembly
321  // if we haven't already:
322  size_t pc_index;
323  size_t range_index;
324  InstructionList *instructions =
325  GetInstructionsForAddress(cur_addr, range_index, pc_index);
326  if (instructions == nullptr)
327  return false;
328  else {
329  const bool ignore_calls = GetKind() == eKindStepOverRange;
330  uint32_t branch_index = instructions->GetIndexOfNextBranchInstruction(
331  pc_index, ignore_calls, &m_found_calls);
332  Address run_to_address;
333 
334  // If we didn't find a branch, run to the end of the range.
335  if (branch_index == UINT32_MAX) {
336  uint32_t last_index = instructions->GetSize() - 1;
337  if (last_index - pc_index > 1) {
338  InstructionSP last_inst =
339  instructions->GetInstructionAtIndex(last_index);
340  size_t last_inst_size = last_inst->GetOpcode().GetByteSize();
341  run_to_address = last_inst->GetAddress();
342  run_to_address.Slide(last_inst_size);
343  }
344  } else if (branch_index - pc_index > 1) {
345  run_to_address =
346  instructions->GetInstructionAtIndex(branch_index)->GetAddress();
347  }
348 
349  if (run_to_address.IsValid()) {
350  const bool is_internal = true;
352  GetTarget().CreateBreakpoint(run_to_address, is_internal, false);
353  if (m_next_branch_bp_sp) {
354 
355  if (m_next_branch_bp_sp->IsHardware() &&
356  !m_next_branch_bp_sp->HasResolvedLocations())
358 
359  if (log) {
361  BreakpointLocationSP bp_loc =
362  m_next_branch_bp_sp->GetLocationAtIndex(0);
363  if (bp_loc) {
364  BreakpointSiteSP bp_site = bp_loc->GetBreakpointSite();
365  if (bp_site) {
366  bp_site_id = bp_site->GetID();
367  }
368  }
369  LLDB_LOGF(log,
370  "ThreadPlanStepRange::SetNextBranchBreakpoint - Setting "
371  "breakpoint %d (site %d) to run to address 0x%" PRIx64,
372  m_next_branch_bp_sp->GetID(), bp_site_id,
373  run_to_address.GetLoadAddress(&m_process.GetTarget()));
374  }
375 
376  m_next_branch_bp_sp->SetThreadID(m_tid);
377  m_next_branch_bp_sp->SetBreakpointKind("next-branch-location");
378 
379  return true;
380  } else
381  return false;
382  }
383  }
384  return false;
385 }
386 
388  lldb::StopInfoSP stop_info_sp) {
390  if (!m_next_branch_bp_sp)
391  return false;
392 
393  break_id_t bp_site_id = stop_info_sp->GetValue();
394  BreakpointSiteSP bp_site_sp =
396  if (!bp_site_sp)
397  return false;
398  else if (!bp_site_sp->IsBreakpointAtThisSite(m_next_branch_bp_sp->GetID()))
399  return false;
400  else {
401  // If we've hit the next branch breakpoint, then clear it.
402  size_t num_owners = bp_site_sp->GetNumberOfOwners();
403  bool explains_stop = true;
404  // If all the owners are internal, then we are probably just stepping over
405  // this range from multiple threads, or multiple frames, so we want to
406  // continue. If one is not internal, then we should not explain the stop,
407  // and let the user breakpoint handle the stop.
408  for (size_t i = 0; i < num_owners; i++) {
409  if (!bp_site_sp->GetOwnerAtIndex(i)->GetBreakpoint().IsInternal()) {
410  explains_stop = false;
411  break;
412  }
413  }
414  LLDB_LOGF(log,
415  "ThreadPlanStepRange::NextRangeBreakpointExplainsStop - Hit "
416  "next range breakpoint which has %" PRIu64
417  " owners - explains stop: %u.",
418  (uint64_t)num_owners, explains_stop);
420  return explains_stop;
421  }
422 }
423 
424 bool ThreadPlanStepRange::WillStop() { return true; }
425 
428  return eStateRunning;
429  else
430  return eStateStepping;
431 }
432 
434  // If we have pushed some plans between ShouldStop & MischiefManaged, then
435  // we're not done...
436  // I do this check first because we might have stepped somewhere that will
437  // fool InRange into
438  // thinking it needs to step past the end of that line. This happens, for
439  // instance, when stepping over inlined code that is in the middle of the
440  // current line.
441 
442  if (!m_no_more_plans)
443  return false;
444 
445  bool done = true;
446  if (!IsPlanComplete()) {
447  if (InRange()) {
448  done = false;
449  } else {
451  done = (frame_order != eFrameCompareOlder) ? m_no_more_plans : true;
452  }
453  }
454 
455  if (done) {
457  LLDB_LOGF(log, "Completed step through range plan.");
460  return true;
461  } else {
462  return false;
463  }
464 }
465 
469 
470  if (frame_order == eFrameCompareOlder) {
471  if (log) {
472  LLDB_LOGF(log, "ThreadPlanStepRange::IsPlanStale returning true, we've "
473  "stepped out.");
474  }
475  return true;
476  } else if (frame_order == eFrameCompareEqual && InSymbol()) {
477  // If we are not in a place we should step through, we've gotten stale. One
478  // tricky bit here is that some stubs don't push a frame, so we should.
479  // check that we are in the same symbol.
480  if (!InRange()) {
481  // Set plan Complete when we reach next instruction just after the range
482  lldb::addr_t addr = GetThread().GetRegisterContext()->GetPC() - 1;
483  size_t num_ranges = m_address_ranges.size();
484  for (size_t i = 0; i < num_ranges; i++) {
485  bool in_range =
486  m_address_ranges[i].ContainsLoadAddress(addr, &GetTarget());
487  if (in_range) {
488  SetPlanComplete();
489  }
490  }
491  return true;
492  }
493  }
494  return false;
495 }
lldb::eFrameCompareEqual
@ eFrameCompareEqual
Definition: lldb-enumerations.h:863
lldb_private::AddressRange::GetBaseAddress
Address & GetBaseAddress()
Get accessor for the base address of the range.
Definition: AddressRange.h:209
lldb_private::ThreadPlan::GetThread
Thread & GetThread()
Returns the Thread that is using this thread plan.
Definition: ThreadPlan.cpp:41
lldb::FrameComparison
FrameComparison
This is the return value for frame comparisons.
Definition: lldb-enumerations.h:860
lldb_private::Address::IsValid
bool IsValid() const
Check if the object state is valid.
Definition: Address.h:336
lldb_private::Event
Definition: Event.h:180
lldb_private::ThreadPlan::IsPlanComplete
bool IsPlanComplete()
Definition: ThreadPlan.cpp:60
lldb_private::LineEntry::IsValid
bool IsValid() const
Check if a line entry object is valid.
Definition: LineEntry.cpp:46
lldb_private::Function::GetAddressRange
const AddressRange & GetAddressRange()
Definition: Function.h:461
lldb_private::Symbol::ValueIsAddress
bool ValueIsAddress() const
Definition: Symbol.cpp:117
lldb_private::eVoteYes
@ eVoteYes
Definition: lldb-private-enumerations.h:59
lldb_private::ThreadPlanStepRange::GetPlanRunState
lldb::StateType GetPlanRunState() override
Definition: ThreadPlanStepRange.cpp:426
lldb_private::ThreadPlanStepRange::m_addr_context
SymbolContext m_addr_context
Definition: ThreadPlanStepRange.h:65
LLDB_LOGF
#define LLDB_LOGF(log,...)
Definition: Log.h:249
lldb_private::ThreadPlan::GetKind
ThreadPlanKind GetKind() const
Definition: ThreadPlan.h:418
lldb_private::ThreadPlanStepRange::SetNextBranchBreakpoint
bool SetNextBranchBreakpoint()
Definition: ThreadPlanStepRange.cpp:306
lldb_private::ThreadPlanStepRange::m_next_branch_bp_sp
lldb::BreakpointSP m_next_branch_bp_sp
Definition: ThreadPlanStepRange.h:76
lldb_private::Process::GetBreakpointSiteList
BreakpointSiteList & GetBreakpointSiteList()
Definition: Process.cpp:1554
lldb_private::ThreadPlanStepRange::IsPlanStale
bool IsPlanStale() override
Definition: ThreadPlanStepRange.cpp:466
BreakpointLocation.h
lldb_private::Process::GetTarget
Target & GetTarget()
Get the target object pointer for this module.
Definition: Process.h:1214
lldb_private::ThreadPlan::eKindStepOverRange
@ eKindStepOverRange
Definition: ThreadPlan.h:296
lldb_private::LineEntry::GetSameLineContiguousAddressRange
AddressRange GetSameLineContiguousAddressRange(bool include_inlined_functions) const
Give the range for this LineEntry + any additional LineEntries for this same source line that are con...
Definition: LineEntry.cpp:192
Disassembler.h
lldb_private::eVoteNoOpinion
@ eVoteNoOpinion
Definition: lldb-private-enumerations.h:59
lldb_private::InstructionList::GetInstructionAtIndex
lldb::InstructionSP GetInstructionAtIndex(size_t idx) const
Definition: Disassembler.cpp:946
lldb_private::Stream
Definition: Stream.h:28
lldb_private::Target::CreateBreakpoint
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:331
lldb_private::ThreadPlanStepRange::m_instruction_ranges
std::vector< lldb::DisassemblerSP > m_instruction_ranges
Definition: ThreadPlanStepRange.h:87
lldb_private::ThreadPlanStepRange::NextRangeBreakpointExplainsStop
bool NextRangeBreakpointExplainsStop(lldb::StopInfoSP stop_info_sp)
Definition: ThreadPlanStepRange.cpp:387
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::SymbolContext
Definition: SymbolContext.h:33
Process.h
lldb_private::ThreadPlanStepRange::m_given_ranges_only
bool m_given_ranges_only
Definition: ThreadPlanStepRange.h:78
Target.h
lldb_private::ThreadPlan::ThreadPlanKind
ThreadPlanKind
Definition: ThreadPlan.h:287
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::SymbolContext::symbol
Symbol * symbol
The Symbol for a given query.
Definition: SymbolContext.h:323
lldb_private::LineEntry::Dump
bool Dump(Stream *s, Target *target, bool show_file, Address::DumpStyle style, Address::DumpStyle fallback_style, bool show_range) const
Dump a description of this object to a Stream.
Definition: LineEntry.cpp:70
lldb_private::ThreadPlan::GetTarget
Target & GetTarget()
Definition: ThreadPlan.cpp:37
lldb_private::ThreadPlan
Definition: ThreadPlan.h:282
lldb_private::InstructionList
Definition: Disassembler.h:267
lldb_private::eVoteNo
@ eVoteNo
Definition: lldb-private-enumerations.h:59
ThreadPlanStepRange.h
lldb_private::Disassembler::DisassembleRange
static lldb::DisassemblerSP DisassembleRange(const ArchSpec &arch, const char *plugin_name, const char *flavor, Target &target, const AddressRange &disasm_range, bool force_live_memory=false)
Definition: Disassembler.cpp:123
lldb_private::Address::DumpStyleLoadAddress
@ DumpStyleLoadAddress
Display as the load address (if resolved).
Definition: Address.h:96
Log.h
lldb_private::ThreadPlanStepRange::m_parent_stack_id
StackID m_parent_stack_id
Definition: ThreadPlanStepRange.h:69
lldb_private::ThreadPlanStepRange::m_no_more_plans
bool m_no_more_plans
Definition: ThreadPlanStepRange.h:71
lldb_private::ThreadPlan::MischiefManaged
virtual bool MischiefManaged()
Definition: ThreadPlan.cpp:71
lldb_private::Thread
Definition: Thread.h:62
lldb::eFrameCompareSameParent
@ eFrameCompareSameParent
Definition: lldb-enumerations.h:864
lldb_private::StreamString::GetData
const char * GetData() const
Definition: StreamString.h:43
lldb_private::SymbolContext::function
Function * function
The Function for a given query.
Definition: SymbolContext.h:320
lldb_private::Symbol::GetAddressRef
Address & GetAddressRef()
Definition: Symbol.h:57
lldb::break_id_t
int32_t break_id_t
Definition: lldb-types.h:88
lldb_private::StreamString
Definition: StreamString.h:23
lldb_private::AddressRange
Definition: AddressRange.h:25
lldb_private::ThreadPlanStepRange::DidPush
void DidPush() override
Definition: ThreadPlanStepRange.cpp:52
lldb_private::BreakpointSiteList::FindByID
lldb::BreakpointSiteSP FindByID(lldb::break_id_t breakID)
Returns a shared pointer to the breakpoint site with id breakID.
Definition: BreakpointSiteList.cpp:111
lldb_private::GetLogIfAllCategoriesSet
Log * GetLogIfAllCategoriesSet(uint32_t mask)
Definition: Logging.cpp:58
lldb_private::ThreadPlanStepRange::AddRange
void AddRange(const AddressRange &new_range)
Definition: ThreadPlanStepRange.cpp:76
lldb_private::InstructionList::GetIndexOfNextBranchInstruction
uint32_t GetIndexOfNextBranchInstruction(uint32_t start, bool ignore_calls, bool *found_calls) const
Get the index of the next branch instruction.
Definition: Disassembler.cpp:992
lldb_private::ThreadPlanStepRange::ClearNextBranchBreakpoint
void ClearNextBranchBreakpoint()
Definition: ThreadPlanStepRange.cpp:294
ThreadPlanRunToAddress.h
lldb::eFrameCompareYounger
@ eFrameCompareYounger
Definition: lldb-enumerations.h:865
Thread.h
lldb_private::ThreadPlanStepRange::InSymbol
bool InSymbol()
Definition: ThreadPlanStepRange.cpp:195
lldb_private::ThreadPlanStepRange::GetInstructionsForAddress
InstructionList * GetInstructionsForAddress(lldb::addr_t addr, size_t &range_index, size_t &insn_offset)
Definition: ThreadPlanStepRange.cpp:254
lldb_private::LineEntry::original_file
FileSpec original_file
The original source file, from debug info.
Definition: LineEntry.h:142
lldb_private::LineEntry::line
uint32_t line
The source line number, or zero if there is no line number information.
Definition: LineEntry.h:143
lldb::RunMode
RunMode
Thread Run Modes.
Definition: lldb-enumerations.h:135
LLDB_INVALID_BREAK_ID
#define LLDB_INVALID_BREAK_ID
Definition: lldb-defines.h:49
Symbol.h
lldb::eStateStepping
@ eStateStepping
Process or thread is in the process of stepping and can not be examined.
Definition: lldb-enumerations.h:86
lldb_private::ThreadPlan::SetPlanComplete
void SetPlanComplete(bool success=true)
Definition: ThreadPlan.cpp:65
lldb_private::ThreadPlanStepRange::m_stack_id
StackID m_stack_id
Definition: ThreadPlanStepRange.h:68
lldb_private::ThreadPlanStepRange::~ThreadPlanStepRange
~ThreadPlanStepRange() override
Definition: ThreadPlanStepRange.cpp:50
uint32_t
lldb_private::ThreadPlanStepRange::ShouldReportStop
Vote ShouldReportStop(Event *event_ptr) override
Definition: ThreadPlanStepRange.cpp:67
lldb_private::Address
Definition: Address.h:59
lldb_private::ThreadPlanStepRange::m_use_fast_step
bool m_use_fast_step
Definition: ThreadPlanStepRange.h:77
lldb::eOnlyDuringStepping
@ eOnlyDuringStepping
Definition: lldb-enumerations.h:135
lldb_private::ThreadPlan::m_could_not_resolve_hw_bp
bool m_could_not_resolve_hw_bp
Definition: ThreadPlan.h:528
lldb_private::ThreadPlanStepRange::CompareCurrentFrameToStartFrame
lldb::FrameComparison CompareCurrentFrameToStartFrame()
Definition: ThreadPlanStepRange.cpp:215
lldb_private::ThreadPlanStepRange::DumpRanges
void DumpRanges(Stream *s)
Definition: ThreadPlanStepRange.cpp:88
lldb_private::Address::GetLoadAddress
lldb::addr_t GetLoadAddress(Target *target) const
Get the load address.
Definition: Address.cpp:310
lldb_private::Symbol::GetByteSize
lldb::addr_t GetByteSize() const
Definition: Symbol.cpp:414
UINT32_MAX
#define UINT32_MAX
Definition: lldb-defines.h:31
lldb_private::LineEntry::range
AddressRange range
The section offset address range for this line entry.
Definition: LineEntry.h:139
lldb_private::TargetProperties::GetUseFastStepping
bool GetUseFastStepping() const
Definition: Target.cpp:4222
StopInfo.h
lldb_private::Vote
Vote
Definition: lldb-private-enumerations.h:59
lldb_private::Target::RemoveBreakpointByID
bool RemoveBreakpointByID(lldb::break_id_t break_id)
Definition: Target.cpp:934
lldb_private::ThreadPlanStepRange::ValidatePlan
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
Definition: ThreadPlanStepRange.cpp:57
Function.h
lldb_private::Stream::Printf
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition: Stream.cpp:107
lldb_private::InstructionList::GetSize
size_t GetSize() const
Definition: Disassembler.cpp:932
lldb_private::ThreadPlanStepRange::m_stop_others
lldb::RunMode m_stop_others
Definition: ThreadPlanStepRange.h:67
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
LIBLLDB_LOG_STEP
#define LIBLLDB_LOG_STEP
Definition: Logging.h:21
lldb_private::StackID::IsValid
bool IsValid() const
Definition: StackID.h:49
lldb_private::ThreadPlan::m_tid
lldb::tid_t m_tid
Definition: ThreadPlan.h:524
lldb::eAllThreads
@ eAllThreads
Definition: lldb-enumerations.h:135
lldb_private::StackID
Definition: StackID.h:17
lldb_private::ThreadPlanStepRange::m_address_ranges
std::vector< AddressRange > m_address_ranges
Definition: ThreadPlanStepRange.h:66
BreakpointSite.h
lldb::StateType
StateType
Process and Thread States.
Definition: lldb-enumerations.h:73
Stream.h
lldb_private::Log
Definition: Log.h:49
lldb_private::ThreadPlanStepRange::m_found_calls
bool m_found_calls
Definition: ThreadPlanStepRange.h:79
lldb_private::Thread::GetStackFrameAtIndex
virtual lldb::StackFrameSP GetStackFrameAtIndex(uint32_t idx)
Definition: Thread.h:399
lldb_private::ThreadPlanStepRange::InRange
bool InRange()
Definition: ThreadPlanStepRange.cpp:100
lldb_private::SymbolContext::line_entry
LineEntry line_entry
The LineEntry for a given query.
Definition: SymbolContext.h:322
lldb_private::ThreadPlanStepRange::MischiefManaged
bool MischiefManaged() override
Definition: ThreadPlanStepRange.cpp:433
lldb_private::Thread::GetRegisterContext
virtual lldb::RegisterContextSP GetRegisterContext()=0
lldb_private::ThreadPlan::m_process
Process & m_process
Definition: ThreadPlan.h:523
lldb_private::AddressRange::ContainsLoadAddress
bool ContainsLoadAddress(const Address &so_addr, Target *target) const
Check if a section offset so_addr when represented as a load address is contained within this object'...
Definition: AddressRange.cpp:102
lldb_private::ThreadPlanStepRange::StopOthers
bool StopOthers() override
Definition: ThreadPlanStepRange.cpp:238
lldb_private::StackFrame
Definition: StackFrame.h:40
lldb_private::Address::Slide
bool Slide(int64_t offset)
Definition: Address.h:440
lldb
Definition: SBAddress.h:15
lldb_private::ThreadPlanStepRange::WillStop
bool WillStop() override
Definition: ThreadPlanStepRange.cpp:424
lldb::eStateRunning
@ eStateRunning
Process or thread is running and can't be examined.
Definition: lldb-enumerations.h:85
RegisterContext.h
lldb_private::StackFrame::GetSymbolContext
const SymbolContext & GetSymbolContext(lldb::SymbolContextItem resolve_scope)
Provide a SymbolContext for this StackFrame's current pc value.
Definition: StackFrame.cpp:298
ExecutionContext.h
lldb::eFrameCompareOlder
@ eFrameCompareOlder
Definition: lldb-enumerations.h:866
lldb::eOnlyThisThread
@ eOnlyThisThread
Definition: lldb-enumerations.h:135