LLDB mainline
|
"lldb/Symbol/SymbolContextScope.h" Inherit from this if your object is part of a symbol context and can reconstruct its symbol context. More...
#include <SymbolContextScope.h>
Public Member Functions | |
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. | |
"lldb/Symbol/SymbolContextScope.h" Inherit from this if your object is part of a symbol context and can reconstruct its symbol context.
Many objects that are part of a symbol context that have pointers back to parent objects that own them. Any members of a symbol context that, once they are built, will not go away, can inherit from this pure virtual class and can then reconstruct their symbol context without having to keep a complete SymbolContext object in the object.
Examples of these objects include:
Other objects can store a "SymbolContextScope *" using any pointers to one of the above objects. This allows clients to hold onto a pointer that uniquely will identify a symbol context. Those clients can then always reconstruct the symbol context using the pointer, or use it to uniquely identify a symbol context for an object.
Example objects include that currently use "SymbolContextScope *" objects include:
Objects that adhere to this protocol can reconstruct enough of a symbol context to allow functions that take a symbol context to be called. Lists can also be created using a SymbolContextScope* and and object pairs that allow large collections of objects to be passed around with minimal overhead.
Definition at line 64 of file SymbolContextScope.h.
|
virtualdefault |
|
pure virtual |
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. |
Implemented in lldb_private::Module, lldb_private::Block, lldb_private::CompileUnit, lldb_private::Function, and lldb_private::Symbol.
Referenced by lldb_private::ThreadPlanStepUntil::AnalyzeStop(), lldb_private::Variable::CalculateSymbolContext(), lldb_private::Block::CalculateSymbolContext(), lldb_private::StackID::Dump(), lldb_private::Variable::DumpDeclaration(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::GetTypes(), lldb_private::Variable::NameMatches(), lldb_private::operator<(), and lldb_private::SymbolContext::SymbolContext().
|
inlinevirtual |
Reimplemented in lldb_private::Block.
Definition at line 86 of file SymbolContextScope.h.
Referenced by lldb_private::Block::GetParent(), and lldb_private::SymbolContext::SortTypeList().
|
inlinevirtual |
Reimplemented in lldb_private::Block, lldb_private::CompileUnit, and lldb_private::Function.
Definition at line 82 of file SymbolContextScope.h.
Referenced by lldb_private::Block::CalculateSymbolContextCompileUnit(), lldb_private::Variable::GetLanguage(), SymbolFilePDB::GetTypes(), and lldb_private::SymbolContext::SortTypeList().
|
inlinevirtual |
Reimplemented in lldb_private::Block, and lldb_private::Function.
Definition at line 84 of file SymbolContextScope.h.
Referenced by lldb_private::Block::AddRange(), lldb_private::Block::CalculateSymbolContextFunction(), lldb_private::Variable::GetLanguage(), and lldb_private::SymbolContext::SortTypeList().
|
inlinevirtual |
Reimplemented in lldb_private::Module, lldb_private::Block, lldb_private::CompileUnit, lldb_private::Function, and lldb_private::Symbol.
Definition at line 78 of file SymbolContextScope.h.
Referenced by lldb_private::Block::AddRange(), lldb_private::Block::CalculateSymbolContextModule(), lldb_private::Variable::Dump(), lldb_private::Variable::DumpLocations(), lldb_private::ValueObjectVariable::GetModule(), and lldb_private::SymbolContext::SortTypeList().
|
inlinevirtual |
Reimplemented in lldb_private::Symbol.
Definition at line 88 of file SymbolContextScope.h.
|
pure virtual |
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. |
Implemented in lldb_private::Module, lldb_private::Block, lldb_private::CompileUnit, lldb_private::Function, and lldb_private::Symbol.
Referenced by lldb_private::Variable::Dump(), and lldb_private::Type::Dump().