LLDB  mainline
Block.cpp
Go to the documentation of this file.
1 //===-- Block.cpp -----------------------------------------------*- C++ -*-===//
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 
9 #include "lldb/Symbol/Block.h"
10 
11 #include "lldb/Core/Module.h"
12 #include "lldb/Core/Section.h"
13 #include "lldb/Symbol/Function.h"
14 #include "lldb/Symbol/SymbolFile.h"
17 #include "lldb/Utility/Log.h"
18 
19 #include <memory>
20 
21 using namespace lldb;
22 using namespace lldb_private;
23 
24 Block::Block(lldb::user_id_t uid)
25  : UserID(uid), m_parent_scope(nullptr), m_children(), m_ranges(),
26  m_inlineInfoSP(), m_variable_list_sp(), m_parsed_block_info(false),
27  m_parsed_block_variables(false), m_parsed_child_blocks(false) {}
28 
30 
32  lldb::DescriptionLevel level, Target *target) const {
33  *s << "id = " << ((const UserID &)*this);
34 
35  size_t num_ranges = m_ranges.GetSize();
36  if (num_ranges > 0) {
37 
38  addr_t base_addr = LLDB_INVALID_ADDRESS;
39  if (target)
40  base_addr =
41  function->GetAddressRange().GetBaseAddress().GetLoadAddress(target);
42  if (base_addr == LLDB_INVALID_ADDRESS)
43  base_addr = function->GetAddressRange().GetBaseAddress().GetFileAddress();
44 
45  s->Printf(", range%s = ", num_ranges > 1 ? "s" : "");
46  for (size_t i = 0; i < num_ranges; ++i) {
47  const Range &range = m_ranges.GetEntryRef(i);
48  s->AddressRange(base_addr + range.GetRangeBase(),
49  base_addr + range.GetRangeEnd(), 4);
50  }
51  }
52 
53  if (m_inlineInfoSP.get() != nullptr) {
54  bool show_fullpaths = (level == eDescriptionLevelVerbose);
55  m_inlineInfoSP->Dump(s, show_fullpaths);
56  }
57 }
58 
59 void Block::Dump(Stream *s, addr_t base_addr, int32_t depth,
60  bool show_context) const {
61  if (depth < 0) {
62  Block *parent = GetParent();
63  if (parent) {
64  // We have a depth that is less than zero, print our parent blocks first
65  parent->Dump(s, base_addr, depth + 1, show_context);
66  }
67  }
68 
69  s->Printf("%p: ", static_cast<const void *>(this));
70  s->Indent();
71  *s << "Block" << static_cast<const UserID &>(*this);
72  const Block *parent_block = GetParent();
73  if (parent_block) {
74  s->Printf(", parent = {0x%8.8" PRIx64 "}", parent_block->GetID());
75  }
76  if (m_inlineInfoSP.get() != nullptr) {
77  bool show_fullpaths = false;
78  m_inlineInfoSP->Dump(s, show_fullpaths);
79  }
80 
81  if (!m_ranges.IsEmpty()) {
82  *s << ", ranges =";
83 
84  size_t num_ranges = m_ranges.GetSize();
85  for (size_t i = 0; i < num_ranges; ++i) {
86  const Range &range = m_ranges.GetEntryRef(i);
87  if (parent_block != nullptr && !parent_block->Contains(range))
88  *s << '!';
89  else
90  *s << ' ';
91  s->AddressRange(base_addr + range.GetRangeBase(),
92  base_addr + range.GetRangeEnd(), 4);
93  }
94  }
95  s->EOL();
96 
97  if (depth > 0) {
98  s->IndentMore();
99 
100  if (m_variable_list_sp.get()) {
101  m_variable_list_sp->Dump(s, show_context);
102  }
103 
104  collection::const_iterator pos, end = m_children.end();
105  for (pos = m_children.begin(); pos != end; ++pos)
106  (*pos)->Dump(s, base_addr, depth - 1, show_context);
107 
108  s->IndentLess();
109  }
110 }
111 
113  if (block_id == GetID())
114  return this;
115 
116  Block *matching_block = nullptr;
117  collection::const_iterator pos, end = m_children.end();
118  for (pos = m_children.begin(); pos != end; ++pos) {
119  matching_block = (*pos)->FindBlockByID(block_id);
120  if (matching_block)
121  break;
122  }
123  return matching_block;
124 }
125 
127  if (m_parent_scope)
129  sc->block = this;
130 }
131 
133  if (m_parent_scope)
135  return lldb::ModuleSP();
136 }
137 
139  if (m_parent_scope)
141  return nullptr;
142 }
143 
145  if (m_parent_scope)
147  return nullptr;
148 }
149 
151 
154  if (function)
155  function->DumpSymbolContext(s);
156  s->Printf(", Block{0x%8.8" PRIx64 "}", GetID());
157 }
158 
160  if (!m_ranges.IsEmpty()) {
161  size_t num_ranges = m_ranges.GetSize();
162  for (size_t i = 0; i < num_ranges; ++i) {
163  const Range &range = m_ranges.GetEntryRef(i);
164  s->AddressRange(base_addr + range.GetRangeBase(),
165  base_addr + range.GetRangeEnd(), 4);
166  }
167  }
168 }
169 
170 bool Block::Contains(addr_t range_offset) const {
171  return m_ranges.FindEntryThatContains(range_offset) != nullptr;
172 }
173 
174 bool Block::Contains(const Block *block) const {
175  if (this == block)
176  return false; // This block doesn't contain itself...
177 
178  // Walk the parent chain for "block" and see if any if them match this block
179  const Block *block_parent;
180  for (block_parent = block->GetParent(); block_parent != nullptr;
181  block_parent = block_parent->GetParent()) {
182  if (this == block_parent)
183  return true; // One of the parents of "block" is this object!
184  }
185  return false;
186 }
187 
188 bool Block::Contains(const Range &range) const {
189  return m_ranges.FindEntryThatContains(range) != nullptr;
190 }
191 
193  if (m_parent_scope)
195  return nullptr;
196 }
197 
200  return this;
201  return GetInlinedParent();
202 }
203 
205  Block *parent_block = GetParent();
206  if (parent_block) {
207  if (parent_block->GetInlinedFunctionInfo())
208  return parent_block;
209  else
210  return parent_block->GetInlinedParent();
211  }
212  return nullptr;
213 }
214 
216  const Declaration &find_call_site) {
217  auto inlined_block = GetContainingInlinedBlock();
218 
219  while (inlined_block) {
220  auto function_info = inlined_block->GetInlinedFunctionInfo();
221 
222  if (function_info &&
223  function_info->GetCallSite().FileAndLineEqual(find_call_site))
224  return inlined_block;
225  inlined_block = inlined_block->GetInlinedParent();
226  }
227  return nullptr;
228 }
229 
230 bool Block::GetRangeContainingOffset(const addr_t offset, Range &range) {
231  const Range *range_ptr = m_ranges.FindEntryThatContains(offset);
232  if (range_ptr) {
233  range = *range_ptr;
234  return true;
235  }
236  range.Clear();
237  return false;
238 }
239 
241  AddressRange &range) {
243  if (function) {
244  const AddressRange &func_range = function->GetAddressRange();
245  if (addr.GetSection() == func_range.GetBaseAddress().GetSection()) {
246  const addr_t addr_offset = addr.GetOffset();
247  const addr_t func_offset = func_range.GetBaseAddress().GetOffset();
248  if (addr_offset >= func_offset &&
249  addr_offset < func_offset + func_range.GetByteSize()) {
250  addr_t offset = addr_offset - func_offset;
251 
252  const Range *range_ptr = m_ranges.FindEntryThatContains(offset);
253 
254  if (range_ptr) {
255  range.GetBaseAddress() = func_range.GetBaseAddress();
256  range.GetBaseAddress().SetOffset(func_offset +
257  range_ptr->GetRangeBase());
258  range.SetByteSize(range_ptr->GetByteSize());
259  return true;
260  }
261  }
262  }
263  }
264  range.Clear();
265  return false;
266 }
267 
269  Target &target, AddressRange &range) {
270  Address load_address;
271  load_address.SetLoadAddress(load_addr, &target);
272  AddressRange containing_range;
273  return GetRangeContainingAddress(load_address, containing_range);
274 }
275 
278  if (function) {
279  const AddressRange &func_range = function->GetAddressRange();
280  if (addr.GetSection() == func_range.GetBaseAddress().GetSection()) {
281  const addr_t addr_offset = addr.GetOffset();
282  const addr_t func_offset = func_range.GetBaseAddress().GetOffset();
283  if (addr_offset >= func_offset &&
284  addr_offset < func_offset + func_range.GetByteSize()) {
285  addr_t offset = addr_offset - func_offset;
286  return m_ranges.FindEntryIndexThatContains(offset);
287  }
288  }
289  }
290  return UINT32_MAX;
291 }
292 
294  if (range_idx < m_ranges.GetSize()) {
296  if (function) {
297  const Range &vm_range = m_ranges.GetEntryRef(range_idx);
298  range.GetBaseAddress() = function->GetAddressRange().GetBaseAddress();
299  range.GetBaseAddress().Slide(vm_range.GetRangeBase());
300  range.SetByteSize(vm_range.GetByteSize());
301  return true;
302  }
303  }
304  return false;
305 }
306 
308  if (m_ranges.IsEmpty())
309  return false;
310 
312  if (function) {
313  addr = function->GetAddressRange().GetBaseAddress();
315  return true;
316  }
317  return false;
318 }
319 
321  m_ranges.Sort();
323 }
324 
325 void Block::AddRange(const Range &range) {
326  Block *parent_block = GetParent();
327  if (parent_block && !parent_block->Contains(range)) {
329  if (log) {
330  ModuleSP module_sp(m_parent_scope->CalculateSymbolContextModule());
332  const addr_t function_file_addr =
334  const addr_t block_start_addr = function_file_addr + range.GetRangeBase();
335  const addr_t block_end_addr = function_file_addr + range.GetRangeEnd();
336  Type *func_type = function->GetType();
337 
338  const Declaration &func_decl = func_type->GetDeclaration();
339  if (func_decl.GetLine()) {
340  log->Printf("warning: %s:%u block {0x%8.8" PRIx64
341  "} has range[%u] [0x%" PRIx64 " - 0x%" PRIx64
342  ") which is not contained in parent block {0x%8.8" PRIx64
343  "} in function {0x%8.8" PRIx64 "} from %s",
344  func_decl.GetFile().GetPath().c_str(), func_decl.GetLine(),
345  GetID(), (uint32_t)m_ranges.GetSize(), block_start_addr,
346  block_end_addr, parent_block->GetID(), function->GetID(),
347  module_sp->GetFileSpec().GetPath().c_str());
348  } else {
349  log->Printf("warning: block {0x%8.8" PRIx64
350  "} has range[%u] [0x%" PRIx64 " - 0x%" PRIx64
351  ") which is not contained in parent block {0x%8.8" PRIx64
352  "} in function {0x%8.8" PRIx64 "} from %s",
353  GetID(), (uint32_t)m_ranges.GetSize(), block_start_addr,
354  block_end_addr, parent_block->GetID(), function->GetID(),
355  module_sp->GetFileSpec().GetPath().c_str());
356  }
357  }
358  parent_block->AddRange(range);
359  }
360  m_ranges.Append(range);
361 }
362 
363 // Return the current number of bytes that this object occupies in memory
364 size_t Block::MemorySize() const {
365  size_t mem_size = sizeof(Block) + m_ranges.GetSize() * sizeof(Range);
366  if (m_inlineInfoSP.get())
367  mem_size += m_inlineInfoSP->MemorySize();
368  if (m_variable_list_sp.get())
369  mem_size += m_variable_list_sp->MemorySize();
370  return mem_size;
371 }
372 
373 void Block::AddChild(const BlockSP &child_block_sp) {
374  if (child_block_sp) {
375  child_block_sp->SetParentScope(this);
376  m_children.push_back(child_block_sp);
377  }
378 }
379 
380 void Block::SetInlinedFunctionInfo(const char *name, const char *mangled,
381  const Declaration *decl_ptr,
382  const Declaration *call_decl_ptr) {
383  m_inlineInfoSP = std::make_shared<InlineFunctionInfo>(name, mangled, decl_ptr,
384  call_decl_ptr);
385 }
386 
387 VariableListSP Block::GetBlockVariableList(bool can_create) {
389  if (m_variable_list_sp.get() == nullptr && can_create) {
391  SymbolContext sc;
393  assert(sc.module_sp);
394  sc.module_sp->GetSymbolVendor()->ParseVariablesForContext(sc);
395  }
396  }
397  return m_variable_list_sp;
398 }
399 
400 uint32_t
401 Block::AppendBlockVariables(bool can_create, bool get_child_block_variables,
402  bool stop_if_child_block_is_inlined_function,
403  const std::function<bool(Variable *)> &filter,
404  VariableList *variable_list) {
405  uint32_t num_variables_added = 0;
406  VariableList *block_var_list = GetBlockVariableList(can_create).get();
407  if (block_var_list) {
408  for (size_t i = 0; i < block_var_list->GetSize(); ++i) {
409  VariableSP variable = block_var_list->GetVariableAtIndex(i);
410  if (filter(variable.get())) {
411  num_variables_added++;
412  variable_list->AddVariable(variable);
413  }
414  }
415  }
416 
417  if (get_child_block_variables) {
418  collection::const_iterator pos, end = m_children.end();
419  for (pos = m_children.begin(); pos != end; ++pos) {
420  Block *child_block = pos->get();
421  if (!stop_if_child_block_is_inlined_function ||
422  child_block->GetInlinedFunctionInfo() == nullptr) {
423  num_variables_added += child_block->AppendBlockVariables(
424  can_create, get_child_block_variables,
425  stop_if_child_block_is_inlined_function, filter, variable_list);
426  }
427  }
428  }
429  return num_variables_added;
430 }
431 
432 uint32_t Block::AppendVariables(bool can_create, bool get_parent_variables,
433  bool stop_if_block_is_inlined_function,
434  const std::function<bool(Variable *)> &filter,
435  VariableList *variable_list) {
436  uint32_t num_variables_added = 0;
437  VariableListSP variable_list_sp(GetBlockVariableList(can_create));
438 
439  bool is_inlined_function = GetInlinedFunctionInfo() != nullptr;
440  if (variable_list_sp) {
441  for (size_t i = 0; i < variable_list_sp->GetSize(); ++i) {
442  VariableSP variable = variable_list_sp->GetVariableAtIndex(i);
443  if (filter(variable.get())) {
444  num_variables_added++;
445  variable_list->AddVariable(variable);
446  }
447  }
448  }
449 
450  if (get_parent_variables) {
451  if (stop_if_block_is_inlined_function && is_inlined_function)
452  return num_variables_added;
453 
454  Block *parent_block = GetParent();
455  if (parent_block)
456  num_variables_added += parent_block->AppendVariables(
457  can_create, get_parent_variables, stop_if_block_is_inlined_function,
458  filter, variable_list);
459  }
460  return num_variables_added;
461 }
462 
464  if (ModuleSP module_sp = CalculateSymbolContextModule())
465  if (SymbolVendor *sym_vendor = module_sp->GetSymbolVendor())
466  return sym_vendor->GetSymbolFile();
467  return nullptr;
468 }
469 
471  if (SymbolFile *sym_file = GetSymbolFile())
472  return sym_file->GetDeclContextForUID(GetID());
473  return CompilerDeclContext();
474 }
475 
476 void Block::SetBlockInfoHasBeenParsed(bool b, bool set_children) {
478  if (set_children) {
479  m_parsed_child_blocks = true;
480  collection::const_iterator pos, end = m_children.end();
481  for (pos = m_children.begin(); pos != end; ++pos)
482  (*pos)->SetBlockInfoHasBeenParsed(b, true);
483  }
484 }
485 
486 void Block::SetDidParseVariables(bool b, bool set_children) {
488  if (set_children) {
489  collection::const_iterator pos, end = m_children.end();
490  for (pos = m_children.begin(); pos != end; ++pos)
491  (*pos)->SetDidParseVariables(b, true);
492  }
493 }
494 
496  if (m_parent_scope) {
497  Block *parent_block = GetParent();
498  if (parent_block)
499  return parent_block->GetSiblingForChild(this);
500  }
501  return nullptr;
502 }
503 // A parent of child blocks can be asked to find a sibling block given
504 // one of its child blocks
505 Block *Block::GetSiblingForChild(const Block *child_block) const {
506  if (!m_children.empty()) {
507  collection::const_iterator pos, end = m_children.end();
508  for (pos = m_children.begin(); pos != end; ++pos) {
509  if (pos->get() == child_block) {
510  if (++pos != end)
511  return pos->get();
512  break;
513  }
514  }
515  }
516  return nullptr;
517 }
uint32_t GetRangeIndexContainingAddress(const Address &addr)
Definition: Block.cpp:276
const lldb_private::Declaration & GetDeclaration() const
Definition: Type.cpp:439
void Clear(BaseType b=0)
Definition: RangeMap.h:40
void AddRange(const Range &range)
Add a new offset range to this block.
Definition: Block.cpp:325
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
~Block() override
Destructor.
Definition: Block.cpp:29
void GetDescription(Stream *s, Function *function, lldb::DescriptionLevel level, Target *target) const
Definition: Block.cpp:31
lldb::addr_t GetByteSize() const
Get accessor for the byte size of this range.
Definition: AddressRange.h:232
bool Contains(lldb::addr_t range_offset) const
Check if an offset is in one of the block offset ranges.
Definition: Block.cpp:170
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
Block * GetParent() const
Get the parent block.
Definition: Block.cpp:192
bool GetStartAddress(Address &addr)
Definition: Block.cpp:307
void AddVariable(const lldb::VariableSP &var_sp)
Defines a symbol context baton that can be handed other debug core functions.
Definition: SymbolContext.h:33
collection m_children
Definition: Block.h:384
bool IsEmpty() const
Definition: RangeMap.h:239
void AddChild(const lldb::BlockSP &child_block_sp)
Add a child to this object.
Definition: Block.cpp:373
lldb::user_id_t GetID() const
Get accessor for the user ID.
Definition: UserID.h:49
A mix in class that contains a generic user ID.
Definition: UserID.h:33
A class that describes a function.
Definition: Function.h:323
lldb::addr_t GetFileAddress() const
Get the file address.
Definition: Address.cpp:272
lldb::VariableListSP GetBlockVariableList(bool can_create)
Get the variable list for this block only.
Definition: Block.cpp:387
Block * GetSibling() const
Get the sibling block for this block.
Definition: Block.cpp:495
void AddressRange(uint64_t lo_addr, uint64_t hi_addr, uint32_t addr_size, const char *prefix=nullptr, const char *suffix=nullptr)
Output an address range to this stream.
Definition: Stream.cpp:92
A class that describes a single lexical block.
Definition: Block.h:41
bool SetLoadAddress(lldb::addr_t load_addr, Target *target, bool allow_section_end=false)
Set the address to represent load_addr.
Definition: Address.cpp:998
bool GetRangeContainingAddress(const Address &addr, AddressRange &range)
Definition: Block.cpp:240
bool SetOffset(lldb::addr_t offset)
Set accessor for the offset.
Definition: Address.h:419
RangeList m_ranges
Definition: Block.h:385
A class that describes a compilation unit.
Definition: CompileUnit.h:35
Block * GetContainingInlinedBlockWithCallSite(const Declaration &find_call_site)
Get the inlined block at the given call site that contains this block.
Definition: Block.cpp:215
#define LIBLLDB_LOG_SYMBOLS
Definition: Logging.h:34
lldb::addr_t GetOffset() const
Get the section relative offset value.
Definition: Address.h:317
bool GetRangeContainingLoadAddress(lldb::addr_t load_addr, Target &target, AddressRange &range)
Definition: Block.cpp:268
SymbolFile * GetSymbolFile()
Get the symbol file which contains debug info for this block&#39;s symbol context module.
Definition: Block.cpp:463
virtual CompileUnit * CalculateSymbolContextCompileUnit()
#define UINT32_MAX
Definition: lldb-defines.h:31
lldb::VariableSP GetVariableAtIndex(size_t idx) const
bool GetRangeAtIndex(uint32_t range_idx, AddressRange &range)
Definition: Block.cpp:293
void Dump(Stream *s, lldb::addr_t base_addr, int32_t depth, bool show_context) const
Dump the block contents.
Definition: Block.cpp:59
bool Slide(int64_t offset)
Definition: Address.h:430
FileSpec & GetFile()
Get accessor for file specification.
Definition: Declaration.h:148
bool m_parsed_child_blocks
Definition: Block.h:391
void DumpSymbolContext(Stream *s) override
Dump the object&#39;s symbol context to the stream s.
Definition: Block.cpp:152
#define LLDB_INVALID_ADDRESS
Invalid value definitions.
Definition: lldb-defines.h:85
uint64_t user_id_t
Definition: lldb-types.h:84
size_t MemorySize() const
Get the memory cost of this object.
Definition: Block.cpp:364
Log * GetLogIfAllCategoriesSet(uint32_t mask)
Definition: Logging.cpp:57
uint32_t AppendVariables(bool can_create, bool get_parent_variables, bool stop_if_block_is_inlined_function, const std::function< bool(Variable *)> &filter, VariableList *variable_list)
Appends the variables from this block, and optionally from all parent blocks, to variable_list.
Definition: Block.cpp:432
size_t EOL()
Output and End of Line character to the stream.
Definition: Stream.cpp:127
void SetInlinedFunctionInfo(const char *name, const char *mangled, const Declaration *decl_ptr, const Declaration *call_decl_ptr)
Set accessor for any inlined function information.
Definition: Block.cpp:380
Block * GetContainingInlinedBlock()
Get the inlined block that contains this block.
Definition: Block.cpp:198
virtual lldb::ModuleSP CalculateSymbolContextModule()
Block(lldb::user_id_t uid)
Construct with a User ID uid, depth.
Definition: Block.cpp:24
size_t GetSize() const
Definition: RangeMap.h:241
Block * GetInlinedParent()
Get the inlined parent block for this block.
Definition: Block.cpp:204
bool m_parsed_block_variables
Definition: Block.h:391
void IndentLess(int amount=2)
Decrement the current indentation level.
Definition: Stream.cpp:221
const Entry * FindEntryThatContains(B addr) const
Definition: RangeMap.h:283
void FinalizeRanges()
Definition: Block.cpp:320
lldb::ModuleSP CalculateSymbolContextModule() override
Definition: Block.cpp:132
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition: Stream.cpp:106
void CalculateSymbolContext(SymbolContext *sc) override
Reconstruct the object&#39;s symbol context into sc.
Definition: Block.cpp:126
uint32_t GetLine() const
Get accessor for the declaration line number.
Definition: Declaration.h:161
A section + offset based address class.
Definition: Address.h:80
Block * CalculateSymbolContextBlock() override
Definition: Block.cpp:150
const Entry & GetEntryRef(size_t i) const
Definition: RangeMap.h:249
const InlineFunctionInfo * GetInlinedFunctionInfo() const
Get const accessor for any inlined function information.
Definition: Block.h:296
virtual Block * CalculateSymbolContextBlock()
CompilerDeclContext GetDeclContext()
Definition: Block.cpp:470
void SetBlockInfoHasBeenParsed(bool b, bool set_children)
Definition: Block.cpp:476
uint32_t FindEntryIndexThatContains(B addr) const
Definition: RangeMap.h:261
lldb::InlineFunctionInfoSP m_inlineInfoSP
Inlined function information.
Definition: Block.h:386
virtual Function * CalculateSymbolContextFunction()
void CombineConsecutiveRanges()
Definition: RangeMap.h:168
virtual void CalculateSymbolContext(SymbolContext *sc)=0
Reconstruct the object&#39;s symbol context into sc.
Block * GetSiblingForChild(const Block *child_block) const
Definition: Block.cpp:505
SymbolContextScope * m_parent_scope
Definition: Block.h:383
CompileUnit * CalculateSymbolContextCompileUnit() override
Definition: Block.cpp:138
uint64_t addr_t
Definition: lldb-types.h:83
void SetDidParseVariables(bool b, bool set_children)
Definition: Block.cpp:486
lldb::ModuleSP module_sp
The Module for a given query.
Definition: SBAddress.h:15
size_t Indent(const char *s=nullptr)
Indent the current line in the stream.
Definition: Stream.cpp:131
RangeList::Entry Range
Definition: Block.h:44
Address & GetBaseAddress()
Get accessor for the base address of the range.
Definition: AddressRange.h:220
Block * FindBlockByID(lldb::user_id_t block_id)
Definition: Block.cpp:112
void IndentMore(int amount=2)
Increment the current indentation level.
Definition: Stream.cpp:218
Function * CalculateSymbolContextFunction() override
Definition: Block.cpp:144
bool m_parsed_block_info
Set to true if this block and it&#39;s children have all been parsed.
Definition: Block.h:391
lldb::SectionSP GetSection() const
Get const accessor for the section.
Definition: Address.h:410
const AddressRange & GetAddressRange()
Definition: Function.h:371
size_t GetPath(char *path, size_t max_path_length, bool denormalize=true) const
Extract the full path to the file.
Definition: FileSpec.cpp:376
void DumpAddressRanges(Stream *s, lldb::addr_t base_addr)
Definition: Block.cpp:159
A class that describes the declaration location of a lldb object.
Definition: Declaration.h:24
Block * block
The Block for a given query.
void Printf(const char *format,...) __attribute__((format(printf
Definition: Log.cpp:113
A section + offset based address range class.
Definition: AddressRange.h:32
void Clear()
Clear the object&#39;s state.
void Append(const Entry &entry)
Definition: RangeMap.h:139
bool GetRangeContainingOffset(const lldb::addr_t offset, Range &range)
Definition: Block.cpp:230
void SetByteSize(lldb::addr_t byte_size)
Set accessor for the byte size of this range.
Definition: AddressRange.h:248
BaseType GetRangeBase() const
Definition: RangeMap.h:46
uint32_t AppendBlockVariables(bool can_create, bool get_child_block_variables, bool stop_if_child_block_is_inlined_function, const std::function< bool(Variable *)> &filter, VariableList *variable_list)
Get the variable list for this block and optionally all child blocks if get_child_variables is true...
Definition: Block.cpp:401
lldb::VariableListSP m_variable_list_sp
The variable list for all local, static and parameter variables scoped to this block.
Definition: Block.h:387