LLDB mainline
|
A class that describes a single lexical block. More...
#include "lldb/Symbol/Block.h"
Public Types | |
typedef RangeVector< uint32_t, uint32_t, 1 > | RangeList |
typedef RangeList::Entry | Range |
Public Member Functions | |
Block (lldb::user_id_t uid) | |
Construct with a User ID uid, depth. | |
~Block () override | |
Destructor. | |
void | AddChild (const lldb::BlockSP &child_block_sp) |
Add a child to this object. | |
void | AddRange (const Range &range) |
Add a new offset range to this block. | |
void | FinalizeRanges () |
void | CalculateSymbolContext (SymbolContext *sc) override |
Reconstruct the object's symbol context into sc. | |
lldb::ModuleSP | CalculateSymbolContextModule () override |
CompileUnit * | CalculateSymbolContextCompileUnit () override |
Function * | CalculateSymbolContextFunction () override |
Block * | CalculateSymbolContextBlock () override |
bool | Contains (lldb::addr_t range_offset) const |
Check if an offset is in one of the block offset ranges. | |
bool | Contains (const Range &range) const |
Check if a offset range is in one of the block offset ranges. | |
bool | Contains (const Block *block) const |
Check if this object contains "block" as a child block at any depth. | |
void | Dump (Stream *s, lldb::addr_t base_addr, int32_t depth, bool show_context) const |
Dump the block contents. | |
void | DumpSymbolContext (Stream *s) override |
Dump the object's symbol context to the stream s. | |
void | DumpAddressRanges (Stream *s, lldb::addr_t base_addr) |
void | GetDescription (Stream *s, Function *function, lldb::DescriptionLevel level, Target *target) const |
Block * | GetParent () const |
Get the parent block. | |
Block * | GetContainingInlinedBlock () |
Get the inlined block that contains this block. | |
Block * | GetInlinedParent () |
Get the inlined parent block for this block. | |
Block * | GetContainingInlinedBlockWithCallSite (const Declaration &find_call_site) |
Get the inlined block at the given call site that contains this block. | |
Block * | GetSibling () const |
Get the sibling block for this block. | |
Block * | GetFirstChild () const |
Get the first child block. | |
lldb::VariableListSP | GetBlockVariableList (bool can_create) |
Get the variable list for this block only. | |
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. | |
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. | |
const InlineFunctionInfo * | GetInlinedFunctionInfo () const |
Get const accessor for any inlined function information. | |
SymbolFile * | GetSymbolFile () |
Get the symbol file which contains debug info for this block's symbol context module. | |
CompilerDeclContext | GetDeclContext () |
size_t | MemorySize () const |
Get the memory cost of this object. | |
void | SetInlinedFunctionInfo (const char *name, const char *mangled, const Declaration *decl_ptr, const Declaration *call_decl_ptr) |
Set accessor for any inlined function information. | |
void | SetParentScope (SymbolContextScope *parent_scope) |
void | SetVariableList (lldb::VariableListSP &variable_list_sp) |
Set accessor for the variable list. | |
bool | BlockInfoHasBeenParsed () const |
void | SetBlockInfoHasBeenParsed (bool b, bool set_children) |
Block * | FindBlockByID (lldb::user_id_t block_id) |
Block * | FindInnermostBlockByOffset (const lldb::addr_t offset) |
size_t | GetNumRanges () const |
bool | GetRangeContainingOffset (const lldb::addr_t offset, Range &range) |
bool | GetRangeContainingAddress (const Address &addr, AddressRange &range) |
bool | GetRangeContainingLoadAddress (lldb::addr_t load_addr, Target &target, AddressRange &range) |
uint32_t | GetRangeIndexContainingAddress (const Address &addr) |
bool | GetRangeAtIndex (uint32_t range_idx, AddressRange &range) |
AddressRanges | GetRanges () |
bool | GetStartAddress (Address &addr) |
void | SetDidParseVariables (bool b, bool set_children) |
Public Member Functions inherited from lldb_private::UserID | |
UserID (lldb::user_id_t uid=LLDB_INVALID_UID) | |
Construct with optional user ID. | |
~UserID ()=default | |
Destructor. | |
void | Clear () |
Clears the object state. | |
lldb::user_id_t | GetID () const |
Get accessor for the user ID. | |
void | SetID (lldb::user_id_t uid) |
Set accessor for the user ID. | |
Public Member Functions inherited from lldb_private::SymbolContextScope | |
virtual | ~SymbolContextScope ()=default |
virtual void | CalculateSymbolContext (SymbolContext *sc)=0 |
Reconstruct the object's symbol context into sc. | |
virtual lldb::ModuleSP | CalculateSymbolContextModule () |
virtual CompileUnit * | CalculateSymbolContextCompileUnit () |
virtual Function * | CalculateSymbolContextFunction () |
virtual Block * | CalculateSymbolContextBlock () |
virtual Symbol * | CalculateSymbolContextSymbol () |
virtual void | DumpSymbolContext (Stream *s)=0 |
Dump the object's symbol context to the stream s. | |
Protected Types | |
typedef std::vector< lldb::BlockSP > | collection |
Protected Member Functions | |
Block * | GetSiblingForChild (const Block *child_block) const |
Protected Attributes | |
SymbolContextScope * | m_parent_scope |
collection | m_children |
RangeList | m_ranges |
lldb::InlineFunctionInfoSP | m_inlineInfoSP |
Inlined function information. | |
lldb::VariableListSP | m_variable_list_sp |
The variable list for all local, static and parameter variables scoped to this block. | |
bool | m_parsed_block_info: 1 |
Set to true if this block and it's children have all been parsed. | |
bool | m_parsed_block_variables: 1 |
bool | m_parsed_child_blocks: 1 |
Protected Attributes inherited from lldb_private::UserID | |
lldb::user_id_t | m_uid |
The user ID that uniquely identifies an object. | |
Private Member Functions | |
Block (const Block &)=delete | |
const Block & | operator= (const Block &)=delete |
A class that describes a single lexical block.
A Function object owns a BlockList object which owns one or more Block objects. The BlockList object contains a section offset address range, and Block objects contain one or more ranges which are offsets into that range. Blocks are can have discontiguous ranges within the BlockList address range, and each block can contain child blocks each with their own sets of ranges.
Each block has a variable list that represents local, argument, and static variables that are scoped to the block.
Inlined functions are represented by attaching a InlineFunctionInfo shared pointer object to a block. Inlined functions are represented as named blocks.
|
protected |
typedef RangeVector<uint32_t, uint32_t, 1> lldb_private::Block::RangeList |
Block::Block | ( | lldb::user_id_t | uid | ) |
Construct with a User ID uid, depth.
Initialize this block with the specified UID uid. The depth in the block_list is used to represent the parent, sibling, and child block information and also allows for partial parsing at the block level.
[in] | uid | The UID for a given block. This value is given by the SymbolFile plug-in and can be any value that helps the SymbolFile plug-in to match this block back to the debug information data that it parses for further or more in depth parsing. Common values would be the index into a table, or an offset into the debug information. |
|
overridedefault |
Destructor.
|
privatedelete |
void Block::AddChild | ( | const lldb::BlockSP & | child_block_sp | ) |
Add a child to this object.
[in] | child_block_sp | A shared pointer to a child block that will get added to this block. |
Definition at line 401 of file Block.cpp.
References m_children.
Referenced by lldb_private::npdb::SymbolFileNativePDB::CreateBlock(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseBlocksRecursive(), and ParseFunctionBlocksForPDBSymbol().
void Block::AddRange | ( | const Range & | range | ) |
Add a new offset range to this block.
Definition at line 351 of file Block.cpp.
References AddRange(), lldb_private::RangeVector< B, S, N >::Append(), lldb_private::SymbolContextScope::CalculateSymbolContextFunction(), lldb_private::SymbolContextScope::CalculateSymbolContextModule(), Contains(), lldb_private::Function::GetAddressRange(), lldb_private::AddressRange::GetBaseAddress(), lldb_private::Type::GetDeclaration(), lldb_private::Declaration::GetFile(), lldb_private::Address::GetFileAddress(), lldb_private::UserID::GetID(), lldb_private::Declaration::GetLine(), lldb_private::GetLog(), GetParent(), lldb_private::FileSpec::GetPath(), lldb_private::Range< B, S >::GetRangeBase(), lldb_private::Range< B, S >::GetRangeEnd(), lldb_private::RangeVector< B, S, N >::GetSize(), lldb_private::Function::GetType(), LLDB_LOGF, m_parent_scope, m_ranges, and lldb_private::Symbols.
Referenced by AddRange(), lldb_private::npdb::SymbolFileNativePDB::CreateBlock(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseBlocksRecursive(), lldb_private::breakpad::SymbolFileBreakpad::ParseBlocksRecursive(), and ParseFunctionBlocksForPDBSymbol().
uint32_t Block::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.
[in] | can_create | If true, the variables can be parsed if they already haven't been, else the current state of the block will be returned. Passing true for this parameter can be used to see the current state of what has been parsed up to this point. |
[in] | get_child_block_variables | If true, all variables from all child blocks will be added to the variable list. |
Definition at line 429 of file Block.cpp.
References lldb_private::VariableList::AddVariable(), AppendBlockVariables(), GetBlockVariableList(), GetInlinedFunctionInfo(), and m_children.
Referenced by AppendBlockVariables(), and lldb_private::StackFrame::GetVariableList().
uint32_t Block::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.
[in] | can_create | If true, the variables can be parsed if they already haven't been, else the current state of the block will be returned. Passing true for this parameter can be used to see the current state of what has been parsed up to this point. |
[in] | get_parent_variables | If true, all variables from all parent blocks will be added to the variable list. |
[in] | stop_if_block_is_inlined_function | If true, all variables from all parent blocks will be added to the variable list until there are no parent blocks or the parent block has inlined function info. |
[in,out] | variable_list | All variables in this block, and optionally all parent blocks will be added to this list. |
Definition at line 459 of file Block.cpp.
References lldb_private::VariableList::AddVariable(), AppendVariables(), GetBlockVariableList(), GetInlinedFunctionInfo(), and GetParent().
Referenced by AppendVariables(), lldb::SBBlock::AppendVariables(), lldb_private::Address::Dump(), lldb::SBFrame::FindValue(), lldb_private::StackFrame::FindVariable(), and lldb_private::StackFrame::GetInScopeVariableList().
|
inline |
Definition at line 335 of file Block.h.
References m_parsed_block_info.
Referenced by lldb_private::Function::Dump(), and lldb_private::Function::GetBlock().
|
overridevirtual |
Reconstruct the object's symbol context into sc.
The object should fill in as much of the SymbolContext as it can so function calls that require a symbol context can be made for the given object.
[out] | sc | A symbol context object pointer that gets filled in. |
Implements lldb_private::SymbolContextScope.
Definition at line 136 of file Block.cpp.
References lldb_private::SymbolContext::block, lldb_private::SymbolContextScope::CalculateSymbolContext(), and m_parent_scope.
Referenced by GetBlockVariableList(), lldb::SBBlock::GetDescription(), GetModuleConfig(), lldb_private::SymbolContext::GetParentOfInlinedScope(), lldb_private::ThreadPlanStepOut::QueueInlinedStepPlan(), and SetupDeclVendor().
|
overridevirtual |
Reimplemented from lldb_private::SymbolContextScope.
|
overridevirtual |
Reimplemented from lldb_private::SymbolContextScope.
Definition at line 148 of file Block.cpp.
References lldb_private::SymbolContextScope::CalculateSymbolContextCompileUnit(), and m_parent_scope.
|
overridevirtual |
Reimplemented from lldb_private::SymbolContextScope.
Definition at line 154 of file Block.cpp.
References lldb_private::SymbolContextScope::CalculateSymbolContextFunction(), and m_parent_scope.
Referenced by lldb_private::npdb::SymbolFileNativePDB::CreateBlock(), lldb_private::npdb::SymbolFileNativePDB::CreateLocalVariable(), DumpSymbolContext(), GetRangeAtIndex(), GetRangeContainingAddress(), GetRangeIndexContainingAddress(), GetRanges(), GetStartAddress(), and lldb_private::StackFrame::GuessValueForRegisterAndOffset().
|
overridevirtual |
Reimplemented from lldb_private::SymbolContextScope.
Definition at line 142 of file Block.cpp.
References lldb_private::SymbolContextScope::CalculateSymbolContextModule(), and m_parent_scope.
Referenced by GetSymbolFile().
bool Block::Contains | ( | const Block * | block | ) | const |
Check if this object contains "block" as a child block at any depth.
[in] | block | A potential child block. |
Definition at line 184 of file Block.cpp.
References GetParent().
bool Block::Contains | ( | const Range & | range | ) | const |
Check if a offset range is in one of the block offset ranges.
[in] | range | An offset range into the Function's address range. |
Definition at line 198 of file Block.cpp.
References lldb_private::RangeVector< B, S, N >::FindEntryThatContains(), and m_ranges.
bool Block::Contains | ( | lldb::addr_t | range_offset | ) | const |
Check if an offset is in one of the block offset ranges.
[in] | range_offset | An offset into the Function's address range. |
Definition at line 180 of file Block.cpp.
References lldb_private::RangeVector< B, S, N >::FindEntryThatContains(), and m_ranges.
Referenced by AddRange(), Dump(), lldb_private::Variable::IsInScope(), and lldb_private::operator<().
void Block::Dump | ( | Stream * | s, |
lldb::addr_t | base_addr, | ||
int32_t | depth, | ||
bool | show_context | ||
) | const |
Dump the block contents.
[in] | s | The stream to which to dump the object description. |
[in] | base_addr | The resolved start address of the Function's address range. This should be resolved as the file or load address prior to passing the value into this function for dumping. |
[in] | depth | Limit the number of levels deep that this function should print as this block can contain child blocks. Specify INT_MAX to dump all child blocks. |
[in] | show_context | If true, variables will dump their context information. |
Definition at line 59 of file Block.cpp.
References lldb_private::Stream::AsRawOstream(), Contains(), Dump(), lldb_private::DumpAddressRange(), lldb_private::Stream::EOL(), lldb_private::RangeVector< B, S, N >::GetEntryRef(), lldb_private::UserID::GetID(), GetParent(), lldb_private::Range< B, S >::GetRangeBase(), lldb_private::Range< B, S >::GetRangeEnd(), lldb_private::RangeVector< B, S, N >::GetSize(), lldb_private::Stream::Indent(), lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), lldb_private::RangeVector< B, S, N >::IsEmpty(), m_children, m_inlineInfoSP, m_ranges, m_variable_list_sp, and lldb_private::Stream::Printf().
Referenced by lldb_private::Function::Dump(), and Dump().
void Block::DumpAddressRanges | ( | Stream * | s, |
lldb::addr_t | base_addr | ||
) |
Definition at line 169 of file Block.cpp.
References lldb_private::Stream::AsRawOstream(), lldb_private::DumpAddressRange(), lldb_private::RangeVector< B, S, N >::GetEntryRef(), lldb_private::Range< B, S >::GetRangeBase(), lldb_private::Range< B, S >::GetRangeEnd(), lldb_private::RangeVector< B, S, N >::GetSize(), lldb_private::RangeVector< B, S, N >::IsEmpty(), and m_ranges.
Referenced by lldb::SBBlock::GetDescription().
|
overridevirtual |
Dump the object's symbol context to the stream s.
The object should dump its symbol context to the stream s. This function is widely used in the DumpDebug and verbose output for lldb objects.
[in] | s | The stream to which to dump the object's symbol context. |
Implements lldb_private::SymbolContextScope.
Definition at line 162 of file Block.cpp.
References CalculateSymbolContextFunction(), lldb_private::Function::DumpSymbolContext(), lldb_private::UserID::GetID(), and lldb_private::Stream::Printf().
void Block::FinalizeRanges | ( | ) |
Definition at line 346 of file Block.cpp.
References lldb_private::RangeVector< B, S, N >::CombineConsecutiveRanges(), m_ranges, and lldb_private::RangeVector< B, S, N >::Sort().
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::ParseBlocksRecursive(), and ParseFunctionBlocksForPDBSymbol().
Block * Block::FindBlockByID | ( | lldb::user_id_t | block_id | ) |
Definition at line 112 of file Block.cpp.
References FindBlockByID(), lldb_private::UserID::GetID(), and m_children.
Referenced by FindBlockByID(), ParseFunctionBlocksForPDBSymbol(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariableDIE(), SymbolFilePDB::ParseVariableForPDBData(), SymbolFilePDB::ParseVariables(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariablesInFunctionContextRecursive(), lldb_private::plugin::dwarf::SymbolFileDWARF::ResolveFunction(), lldb_private::plugin::dwarf::SymbolFileDWARF::ResolveFunctionAndBlock(), and DWARFASTParserClang::UpdateSymbolContextScopeForType().
Block * Block::FindInnermostBlockByOffset | ( | const lldb::addr_t | offset | ) |
Definition at line 126 of file Block.cpp.
References lldb_private::Contains, FindInnermostBlockByOffset(), and m_children.
Referenced by FindInnermostBlockByOffset().
VariableListSP Block::GetBlockVariableList | ( | bool | can_create | ) |
Get the variable list for this block only.
[in] | can_create | If true, the variables can be parsed if they already haven't been, else the current state of the block will be returned. |
Definition at line 415 of file Block.cpp.
References CalculateSymbolContext(), m_parsed_block_variables, m_variable_list_sp, and lldb_private::SymbolContext::module_sp.
Referenced by AppendBlockVariables(), AppendVariables(), lldb_private::FormatEntity::Format(), lldb::SBFunction::GetArgumentName(), lldb_private::CPlusPlusLanguage::GetFunctionDisplayName(), lldb::SBBlock::GetVariables(), InferPromiseType(), SymbolFilePDB::ParseVariables(), lldb_private::npdb::SymbolFileNativePDB::ParseVariablesForBlock(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariablesInFunctionContextRecursive(), and lldb_private::ClangUserExpression::ScanContext().
Block * Block::GetContainingInlinedBlock | ( | ) |
Get the inlined block that contains this block.
Definition at line 208 of file Block.cpp.
References GetInlinedFunctionInfo(), and GetInlinedParent().
Referenced by AppendInstructionToFunctionCallForest(), DumpAddressOffsetFromFunction(), lldb_private::SymbolContext::DumpStopContext(), lldb_private::BreakpointResolverFileLine::FilterContexts(), lldb_private::FormatEntity::Format(), FormatInlinedBlock(), lldb_private::SymbolContext::GetAddressRange(), lldb::SBBlock::GetContainingInlinedBlock(), GetContainingInlinedBlockWithCallSite(), lldb::SBFrame::GetDisplayFunctionName(), lldb_private::StackFrame::GetFrameBlock(), lldb_private::SymbolContext::GetFunctionBlock(), lldb_private::CPlusPlusLanguage::GetFunctionDisplayName(), lldb::SBFrame::GetFunctionName(), lldb_private::SymbolContext::GetFunctionName(), lldb_private::SymbolContext::GetFunctionStartLineEntry(), lldb_private::SymbolContext::GetParentOfInlinedScope(), lldb_private::LineEntry::GetSameLineContiguousAddressRange(), lldb_private::StackFrame::IsInlined(), lldb::SBFrame::IsInlined(), IsSameInstructionSymbolContext(), lldb_private::ThreadPlanStepOut::QueueInlinedStepPlan(), lldb_private::VerboseTrapFrameRecognizer::RecognizeFrame(), lldb_private::ThreadPlanStepOverRange::ShouldStop(), and lldb_private::SymbolContext::SortTypeList().
Block * Block::GetContainingInlinedBlockWithCallSite | ( | const Declaration & | find_call_site | ) |
Get the inlined block at the given call site that contains this block.
[in] | find_call_site | a declaration with the file and line of the call site to find. |
Definition at line 225 of file Block.cpp.
References GetContainingInlinedBlock(), GetInlinedFunctionInfo(), and GetInlinedParent().
Referenced by lldb_private::LineEntry::GetSameLineContiguousAddressRange().
CompilerDeclContext Block::GetDeclContext | ( | ) |
Definition at line 496 of file Block.cpp.
References lldb_private::UserID::GetID(), and GetSymbolFile().
Referenced by lldb_private::ClangExpressionDeclMap::GetTypeSystemClang(), lldb_private::ClangExpressionDeclMap::LookupFunction(), lldb_private::ClangExpressionDeclMap::LookUpLldbClass(), lldb_private::ClangExpressionDeclMap::LookUpLldbObjCClass(), lldb_private::ClangExpressionDeclMap::LookupLocalVariable(), lldb_private::ClangExpressionDeclMap::LookupLocalVarNamespace(), and lldb_private::ClangUserExpression::ScanContext().
void Block::GetDescription | ( | Stream * | s, |
Function * | function, | ||
lldb::DescriptionLevel | level, | ||
Target * | target | ||
) | const |
Definition at line 31 of file Block.cpp.
References lldb_private::Stream::AsRawOstream(), lldb_private::DumpAddressRange(), lldb::eDescriptionLevelVerbose, lldb_private::Function::GetAddressRange(), lldb_private::AddressRange::GetBaseAddress(), lldb_private::RangeVector< B, S, N >::GetEntryRef(), lldb_private::Address::GetFileAddress(), lldb_private::Address::GetLoadAddress(), lldb_private::Range< B, S >::GetRangeBase(), lldb_private::Range< B, S >::GetRangeEnd(), lldb_private::RangeVector< B, S, N >::GetSize(), LLDB_INVALID_ADDRESS, m_inlineInfoSP, m_ranges, and lldb_private::Stream::Printf().
|
inline |
Get the first child block.
Definition at line 202 of file Block.h.
References m_children.
Referenced by lldb::SBBlock::GetFirstChild().
|
inline |
Get const accessor for any inlined function information.
Definition at line 276 of file Block.h.
References m_inlineInfoSP.
Referenced by AppendBlockVariables(), AppendVariables(), lldb_private::ThreadPlanStepOverRange::DoWillResume(), lldb_private::SymbolContext::DumpStopContext(), lldb_private::BreakpointResolverFileLine::FilterContexts(), lldb_private::FormatEntity::Format(), FormatInlinedBlock(), GetContainingInlinedBlock(), GetContainingInlinedBlockWithCallSite(), lldb::SBFrame::GetDisplayFunctionName(), lldb_private::CPlusPlusLanguage::GetFunctionDisplayName(), lldb::SBFrame::GetFunctionName(), lldb_private::SymbolContext::GetFunctionName(), lldb::SBBlock::GetInlinedCallSiteColumn(), lldb::SBBlock::GetInlinedCallSiteFile(), lldb::SBBlock::GetInlinedCallSiteLine(), lldb::SBBlock::GetInlinedName(), GetInlinedParent(), lldb_private::SymbolContext::GetParentOfInlinedScope(), lldb_private::ThreadPlanStepOverRange::IsEquivalentContext(), lldb::SBBlock::IsInlined(), lldb_private::VerboseTrapFrameRecognizer::RecognizeFrame(), and lldb_private::SymbolContextSpecifier::SymbolContextMatches().
Block * Block::GetInlinedParent | ( | ) |
Get the inlined parent block for this block.
Definition at line 214 of file Block.cpp.
References GetInlinedFunctionInfo(), GetInlinedParent(), and GetParent().
Referenced by GetContainingInlinedBlock(), GetContainingInlinedBlockWithCallSite(), GetInlinedParent(), and lldb_private::StackFrameList::ResetCurrentInlinedDepth().
|
inline |
Definition at line 343 of file Block.h.
References lldb_private::RangeVector< B, S, N >::GetSize(), and m_ranges.
Referenced by lldb_private::npdb::SymbolFileNativePDB::CreateBlock(), lldb::SBBlock::GetNumRanges(), SymbolFilePDB::ParseVariableForPDBData(), and lldb_private::ThreadPlanStepOut::QueueInlinedStepPlan().
Block * Block::GetParent | ( | ) | const |
Get the parent block.
Definition at line 202 of file Block.cpp.
References lldb_private::SymbolContextScope::CalculateSymbolContextBlock(), and m_parent_scope.
Referenced by AddRange(), AppendVariables(), Contains(), lldb_private::npdb::SymbolFileNativePDB::CreateLocalVariable(), Dump(), lldb_private::SymbolContext::GetDescription(), GetInlinedParent(), lldb::SBBlock::GetParent(), lldb_private::SymbolContext::GetParentOfInlinedScope(), GetSibling(), and lldb_private::SymbolContext::SortTypeList().
bool Block::GetRangeAtIndex | ( | uint32_t | range_idx, |
AddressRange & | range | ||
) |
Definition at line 303 of file Block.cpp.
References CalculateSymbolContextFunction(), lldb_private::Function::GetAddressRange(), lldb_private::AddressRange::GetBaseAddress(), lldb_private::Range< B, S >::GetByteSize(), lldb_private::RangeVector< B, S, N >::GetEntryRef(), lldb_private::Range< B, S >::GetRangeBase(), lldb_private::RangeVector< B, S, N >::GetSize(), m_ranges, lldb_private::AddressRange::SetByteSize(), and lldb_private::Address::Slide().
Referenced by lldb_private::SymbolContext::GetAddressRange(), lldb::SBBlock::GetRangeEndAddress(), lldb::SBBlock::GetRangeStartAddress(), SymbolFilePDB::ParseVariableForPDBData(), and lldb_private::ThreadPlanStepOut::QueueInlinedStepPlan().
bool Block::GetRangeContainingAddress | ( | const Address & | addr, |
AddressRange & | range | ||
) |
Definition at line 250 of file Block.cpp.
References CalculateSymbolContextFunction(), lldb_private::AddressRange::Clear(), lldb_private::RangeVector< B, S, N >::FindEntryThatContains(), lldb_private::Function::GetAddressRange(), lldb_private::AddressRange::GetBaseAddress(), lldb_private::AddressRange::GetByteSize(), lldb_private::Range< B, S >::GetByteSize(), lldb_private::Address::GetOffset(), lldb_private::Range< B, S >::GetRangeBase(), lldb_private::Address::GetSection(), m_ranges, lldb_private::AddressRange::SetByteSize(), and lldb_private::Address::SetOffset().
Referenced by CommandObjectThreadStepWithTypeAndScope::DoExecute(), DumpAddressOffsetFromFunction(), lldb_private::SymbolContext::DumpStopContext(), lldb_private::SymbolContext::GetParentOfInlinedScope(), GetRangeContainingLoadAddress(), lldb_private::StackFrameList::ResetCurrentInlinedDepth(), and lldb_private::ThreadPlanStepOverRange::ShouldStop().
bool Block::GetRangeContainingLoadAddress | ( | lldb::addr_t | load_addr, |
Target & | target, | ||
AddressRange & | range | ||
) |
Definition at line 278 of file Block.cpp.
References GetRangeContainingAddress(), and lldb_private::Address::SetLoadAddress().
Referenced by lldb_private::ThreadPlanStepOverRange::DoWillResume().
bool Block::GetRangeContainingOffset | ( | const lldb::addr_t | offset, |
Range & | range | ||
) |
Definition at line 240 of file Block.cpp.
References lldb_private::Range< B, S >::Clear(), lldb_private::RangeVector< B, S, N >::FindEntryThatContains(), and m_ranges.
uint32_t Block::GetRangeIndexContainingAddress | ( | const Address & | addr | ) |
Definition at line 286 of file Block.cpp.
References CalculateSymbolContextFunction(), lldb_private::RangeVector< B, S, N >::FindEntryIndexThatContains(), lldb_private::Function::GetAddressRange(), lldb_private::AddressRange::GetBaseAddress(), lldb_private::AddressRange::GetByteSize(), lldb_private::Address::GetOffset(), lldb_private::Address::GetSection(), m_ranges, and UINT32_MAX.
Referenced by lldb_private::SymbolContext::GetAddressRangeFromHereToEndLine(), and lldb::SBBlock::GetRangeIndexForBlockAddress().
AddressRanges Block::GetRanges | ( | ) |
Definition at line 317 of file Block.cpp.
References CalculateSymbolContextFunction(), lldb_private::Function::GetAddressRange(), lldb_private::AddressRange::GetBaseAddress(), lldb_private::Range< B, S >::GetByteSize(), lldb_private::RangeVector< B, S, N >::GetEntryRef(), lldb_private::Range< B, S >::GetRangeBase(), lldb_private::RangeVector< B, S, N >::GetSize(), m_ranges, and lldb_private::Address::Slide().
Referenced by lldb::SBBlock::GetRanges().
Block * Block::GetSibling | ( | ) | const |
Get the sibling block for this block.
Definition at line 521 of file Block.cpp.
References GetParent(), GetSiblingForChild(), and m_parent_scope.
Referenced by lldb::SBBlock::GetSibling().
bool Block::GetStartAddress | ( | Address & | addr | ) |
Definition at line 333 of file Block.cpp.
References CalculateSymbolContextFunction(), lldb_private::Function::GetAddressRange(), lldb_private::AddressRange::GetBaseAddress(), lldb_private::RangeVector< B, S, N >::GetEntryRef(), lldb_private::Range< B, S >::GetRangeBase(), lldb_private::RangeVector< B, S, N >::IsEmpty(), m_ranges, and lldb_private::Address::Slide().
Referenced by lldb_private::npdb::SymbolFileNativePDB::CreateLocalVariable(), lldb_private::SymbolContext::GetFunctionStartLineEntry(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ResolveFunction().
SymbolFile * Block::GetSymbolFile | ( | ) |
Get the symbol file which contains debug info for this block's symbol context module.
Definition at line 490 of file Block.cpp.
References CalculateSymbolContextModule().
Referenced by lldb_private::Function::GetCallEdges(), and GetDeclContext().
size_t Block::MemorySize | ( | ) | const |
Get the memory cost of this object.
Returns the cost of this object plus any owned objects from the ranges, variables, and inline function information.
Definition at line 392 of file Block.cpp.
References lldb_private::RangeVector< B, S, N >::GetSize(), m_inlineInfoSP, m_ranges, and m_variable_list_sp.
Referenced by lldb_private::Function::MemorySize().
void Block::SetBlockInfoHasBeenParsed | ( | bool | b, |
bool | set_children | ||
) |
Definition at line 502 of file Block.cpp.
References m_children, m_parsed_block_info, and m_parsed_child_blocks.
Referenced by lldb_private::Function::GetBlock().
void Block::SetDidParseVariables | ( | bool | b, |
bool | set_children | ||
) |
Definition at line 512 of file Block.cpp.
References m_children, and m_parsed_block_variables.
Referenced by lldb_private::npdb::SymbolFileNativePDB::ParseVariablesForBlock(), SymbolFilePDB::ParseVariablesForContext(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariablesForContext().
void Block::SetInlinedFunctionInfo | ( | const char * | name, |
const char * | mangled, | ||
const Declaration * | decl_ptr, | ||
const Declaration * | call_decl_ptr | ||
) |
Set accessor for any inlined function information.
[in] | name | The method name for the inlined function. This value should not be nullptr. |
[in] | mangled | The mangled method name for the inlined function. This can be nullptr if there is no mangled name for an inlined function or if the name is the same as name. |
[in] | decl_ptr | A optional pointer to declaration information for the inlined function information. This value can be nullptr to indicate that no declaration information is available. |
[in] | call_decl_ptr | Optional calling location declaration information that describes from where this inlined function was called. |
Definition at line 408 of file Block.cpp.
References m_inlineInfoSP.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::ParseBlocksRecursive().
|
inline |
Definition at line 320 of file Block.h.
References m_parent_scope.
Referenced by lldb_private::Function::Function().
|
inline |
Set accessor for the variable list.
Called by the SymbolFile plug-ins after they have parsed the variable lists and are ready to hand ownership of the list over to this object.
[in] | variable_list_sp | A shared pointer to a VariableList. |
Definition at line 331 of file Block.h.
References m_variable_list_sp.
Referenced by SymbolFilePDB::ParseVariables(), lldb_private::npdb::SymbolFileNativePDB::ParseVariablesForBlock(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariablesInFunctionContextRecursive().
|
protected |
Definition at line 368 of file Block.h.
Referenced by AddChild(), AppendBlockVariables(), Dump(), FindBlockByID(), FindInnermostBlockByOffset(), GetFirstChild(), GetSiblingForChild(), SetBlockInfoHasBeenParsed(), and SetDidParseVariables().
|
protected |
Inlined function information.
Definition at line 370 of file Block.h.
Referenced by Dump(), GetDescription(), GetInlinedFunctionInfo(), MemorySize(), and SetInlinedFunctionInfo().
|
protected |
Definition at line 367 of file Block.h.
Referenced by AddRange(), CalculateSymbolContext(), CalculateSymbolContextCompileUnit(), CalculateSymbolContextFunction(), CalculateSymbolContextModule(), GetParent(), GetSibling(), and SetParentScope().
|
protected |
Set to true if this block and it's children have all been parsed.
Definition at line 374 of file Block.h.
Referenced by BlockInfoHasBeenParsed(), and SetBlockInfoHasBeenParsed().
|
protected |
Definition at line 376 of file Block.h.
Referenced by GetBlockVariableList(), and SetDidParseVariables().
|
protected |
Definition at line 376 of file Block.h.
Referenced by SetBlockInfoHasBeenParsed().
|
protected |
Definition at line 369 of file Block.h.
Referenced by AddRange(), Contains(), Dump(), DumpAddressRanges(), FinalizeRanges(), GetDescription(), GetNumRanges(), GetRangeAtIndex(), GetRangeContainingAddress(), GetRangeContainingOffset(), GetRangeIndexContainingAddress(), GetRanges(), GetStartAddress(), and MemorySize().
|
protected |
The variable list for all local, static and parameter variables scoped to this block.
Definition at line 371 of file Block.h.
Referenced by Dump(), GetBlockVariableList(), MemorySize(), and SetVariableList().