Lines Matching full:block
1 //===-- Block.cpp ---------------------------------------------------------===//
9 #include "lldb/Symbol/Block.h"
24 Block::Block(lldb::user_id_t uid)
29 Block::~Block() = default;
31 void Block::GetDescription(Stream *s, Function *function,
59 void Block::Dump(Stream *s, addr_t base_addr, int32_t depth,
62 Block *parent = GetParent();
71 *s << "Block" << static_cast<const UserID &>(*this);
72 const Block *parent_block = GetParent();
112 Block *Block::FindBlockByID(user_id_t block_id) {
116 Block *matching_block = nullptr;
126 Block *Block::FindInnermostBlockByOffset(const lldb::addr_t offset) {
130 if (Block *block = block_sp->FindInnermostBlockByOffset(offset))
131 return block;
136 void Block::CalculateSymbolContext(SymbolContext *sc) {
139 sc->block = this;
142 lldb::ModuleSP Block::CalculateSymbolContextModule() {
148 CompileUnit *Block::CalculateSymbolContextCompileUnit() {
154 Function *Block::CalculateSymbolContextFunction() {
160 Block *Block::CalculateSymbolContextBlock() { return this; }
162 void Block::DumpSymbolContext(Stream *s) {
166 s->Printf(", Block{0x%8.8" PRIx64 "}", GetID());
169 void Block::DumpAddressRanges(Stream *s, lldb::addr_t base_addr) {
180 bool Block::Contains(addr_t range_offset) const {
184 bool Block::Contains(const Block *block) const {
185 if (this == block)
186 return false; // This block doesn't contain itself...
188 // Walk the parent chain for "block" and see if any if them match this block
189 const Block *block_parent;
190 for (block_parent = block->GetParent(); block_parent != nullptr;
193 return true; // One of the parents of "block" is this object!
198 bool Block::Contains(const Range &range) const {
202 Block *Block::GetParent() const {
208 Block *Block::GetContainingInlinedBlock() {
214 Block *Block::GetInlinedParent() {
215 Block *parent_block = GetParent();
225 Block *Block::GetContainingInlinedBlockWithCallSite(
227 Block *inlined_block = GetContainingInlinedBlock();
240 bool Block::GetRangeContainingOffset(const addr_t offset, Range &range) {
250 bool Block::GetRangeContainingAddress(const Address &addr,
278 bool Block::GetRangeContainingLoadAddress(lldb::addr_t load_addr,
286 uint32_t Block::GetRangeIndexContainingAddress(const Address &addr) {
303 bool Block::GetRangeAtIndex(uint32_t range_idx, AddressRange &range) {
317 AddressRanges Block::GetRanges() {
333 bool Block::GetStartAddress(Address &addr) {
346 void Block::FinalizeRanges() {
351 void Block::AddRange(const Range &range) {
352 Block *parent_block = GetParent();
367 "warning: %s:%u block {0x%8.8" PRIx64
369 ") which is not contained in parent block {0x%8.8" PRIx64
377 "warning: block {0x%8.8" PRIx64 "} has range[%u] [0x%" PRIx64
379 ") which is not contained in parent block {0x%8.8" PRIx64
392 size_t Block::MemorySize() const {
393 size_t mem_size = sizeof(Block) + m_ranges.GetSize() * sizeof(Range);
401 void Block::AddChild(const BlockSP &child_block_sp) {
408 void Block::SetInlinedFunctionInfo(const char *name, const char *mangled,
415 VariableListSP Block::GetBlockVariableList(bool can_create) {
429 Block::AppendBlockVariables(bool can_create, bool get_child_block_variables,
447 Block *child_block = pos->get();
459 uint32_t Block::AppendVariables(bool can_create, bool get_parent_variables,
481 Block *parent_block = GetParent();
490 SymbolFile *Block::GetSymbolFile() {
496 CompilerDeclContext Block::GetDeclContext() {
502 void Block::SetBlockInfoHasBeenParsed(bool b, bool set_children) {
512 void Block::SetDidParseVariables(bool b, bool set_children) {
521 Block *Block::GetSibling() const {
523 Block *parent_block = GetParent();
529 // A parent of child blocks can be asked to find a sibling block given
531 Block *Block::GetSiblingForChild(const Block *child_block) const {