LLDB  mainline
Public Member Functions | List of all members
lldb_private::SymbolContextScope Class Referenceabstract

"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>

Inheritance diagram for lldb_private::SymbolContextScope:
Inheritance graph
[legend]

Public Member Functions

virtual ~SymbolContextScope ()=default
 
virtual void CalculateSymbolContext (SymbolContext *sc)=0
 Reconstruct the object's symbol context into sc. More...
 
virtual lldb::ModuleSP CalculateSymbolContextModule ()
 
virtual CompileUnitCalculateSymbolContextCompileUnit ()
 
virtual FunctionCalculateSymbolContextFunction ()
 
virtual BlockCalculateSymbolContextBlock ()
 
virtual SymbolCalculateSymbolContextSymbol ()
 
virtual void DumpSymbolContext (Stream *s)=0
 Dump the object's symbol context to the stream s. More...
 

Detailed Description

"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.

Constructor & Destructor Documentation

◆ ~SymbolContextScope()

virtual lldb_private::SymbolContextScope::~SymbolContextScope ( )
virtualdefault

Member Function Documentation

◆ CalculateSymbolContext()

virtual void lldb_private::SymbolContextScope::CalculateSymbolContext ( SymbolContext sc)
pure virtual

◆ CalculateSymbolContextBlock()

virtual Block* lldb_private::SymbolContextScope::CalculateSymbolContextBlock ( )
inlinevirtual

◆ CalculateSymbolContextCompileUnit()

virtual CompileUnit* lldb_private::SymbolContextScope::CalculateSymbolContextCompileUnit ( )
inlinevirtual

◆ CalculateSymbolContextFunction()

virtual Function* lldb_private::SymbolContextScope::CalculateSymbolContextFunction ( )
inlinevirtual

◆ CalculateSymbolContextModule()

virtual lldb::ModuleSP lldb_private::SymbolContextScope::CalculateSymbolContextModule ( )
inlinevirtual

◆ CalculateSymbolContextSymbol()

virtual Symbol* lldb_private::SymbolContextScope::CalculateSymbolContextSymbol ( )
inlinevirtual

Reimplemented in lldb_private::Symbol.

Definition at line 88 of file SymbolContextScope.h.

References DumpSymbolContext().

◆ DumpSymbolContext()

virtual void lldb_private::SymbolContextScope::DumpSymbolContext ( Stream s)
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.

Parameters
[in]sThe stream to which to dump the object's symbol context.

Implemented in lldb_private::Function, lldb_private::Module, lldb_private::Symbol, lldb_private::Block, and lldb_private::CompileUnit.

Referenced by CalculateSymbolContextSymbol(), lldb_private::Variable::Dump(), and lldb_private::Type::Dump().


The documentation for this class was generated from the following file: