LLDB  mainline
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
lldb_private::Variable Class Reference

#include <Variable.h>

Inheritance diagram for lldb_private::Variable:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::Variable:
Collaboration graph
[legend]

Public Types

typedef RangeVector< lldb::addr_t, lldb::addr_tRangeList
 
typedef size_t(* GetVariableCallback) (void *baton, const char *name, VariableList &var_list)
 

Public Member Functions

 Variable (lldb::user_id_t uid, const char *name, const char *mangled, const lldb::SymbolFileTypeSP &symfile_type_sp, lldb::ValueType scope, SymbolContextScope *owner_scope, const RangeList &scope_range, Declaration *decl, const DWARFExpression &location, bool external, bool artificial, bool static_member=false)
 
virtual ~Variable ()
 
void Dump (Stream *s, bool show_context) const
 
bool DumpDeclaration (Stream *s, bool show_fullpaths, bool show_module)
 
const DeclarationGetDeclaration () const
 
ConstString GetName () const
 
ConstString GetUnqualifiedName () const
 
SymbolContextScopeGetSymbolContextScope () const
 
bool NameMatches (ConstString name) const
 
bool NameMatches (const RegularExpression &regex) const
 
TypeGetType ()
 
lldb::LanguageType GetLanguage () const
 
lldb::ValueType GetScope () const
 
bool IsExternal () const
 
bool IsArtificial () const
 
bool IsStaticMember () const
 
DWARFExpressionLocationExpression ()
 
const DWARFExpressionLocationExpression () const
 
bool DumpLocationForAddress (Stream *s, const Address &address)
 
size_t MemorySize () const
 
void CalculateSymbolContext (SymbolContext *sc)
 
bool IsInScope (StackFrame *frame)
 
bool LocationIsValidForFrame (StackFrame *frame)
 
bool LocationIsValidForAddress (const Address &address)
 
bool GetLocationIsConstantValueData () const
 
void SetLocationIsConstantValueData (bool b)
 
CompilerDeclContext GetDeclContext ()
 
CompilerDecl GetDecl ()
 
- Public Member Functions inherited from lldb_private::UserID
 UserID (lldb::user_id_t uid=LLDB_INVALID_UID)
 Construct with optional user ID. More...
 
 ~UserID ()
 Destructor. More...
 
void Clear ()
 Clears the object state. More...
 
lldb::user_id_t GetID () const
 Get accessor for the user ID. More...
 
void SetID (lldb::user_id_t uid)
 Set accessor for the user ID. More...
 

Static Public Member Functions

static Status GetValuesForVariableExpressionPath (llvm::StringRef variable_expr_path, ExecutionContextScope *scope, GetVariableCallback callback, void *baton, VariableList &variable_list, ValueObjectList &valobj_list)
 
static size_t AutoComplete (const ExecutionContext &exe_ctx, CompletionRequest &request)
 

Protected Attributes

ConstString m_name
 
Mangled m_mangled
 
lldb::SymbolFileTypeSP m_symfile_type_sp
 
lldb::ValueType m_scope
 
SymbolContextScopem_owner_scope
 
RangeList m_scope_range
 
Declaration m_declaration
 
DWARFExpression m_location
 
uint8_t m_external: 1
 
uint8_t m_artificial: 1
 
uint8_t m_loc_is_const_data: 1
 
uint8_t m_static_member: 1
 
- Protected Attributes inherited from lldb_private::UserID
lldb::user_id_t m_uid
 The user ID that uniquely identifies an object. More...
 

Detailed Description

Definition at line 25 of file Variable.h.

Member Typedef Documentation

◆ GetVariableCallback

typedef size_t(* lldb_private::Variable::GetVariableCallback) (void *baton, const char *name, VariableList &var_list)

Definition at line 94 of file Variable.h.

◆ RangeList

Definition at line 27 of file Variable.h.

Constructor & Destructor Documentation

◆ Variable()

Variable::Variable ( lldb::user_id_t  uid,
const char *  name,
const char *  mangled,
const lldb::SymbolFileTypeSP &  symfile_type_sp,
lldb::ValueType  scope,
SymbolContextScope owner_scope,
const RangeList scope_range,
Declaration decl,
const DWARFExpression location,
bool  external,
bool  artificial,
bool  static_member = false 
)

Definition at line 39 of file Variable.cpp.

Referenced by MemorySize().

◆ ~Variable()

Variable::~Variable ( )
virtual

Definition at line 54 of file Variable.cpp.

Member Function Documentation

◆ AutoComplete()

size_t Variable::AutoComplete ( const ExecutionContext exe_ctx,
CompletionRequest request 
)
static

◆ CalculateSymbolContext()

void Variable::CalculateSymbolContext ( SymbolContext sc)

◆ Dump()

void Variable::Dump ( Stream s,
bool  show_context 
) const

◆ DumpDeclaration()

bool Variable::DumpDeclaration ( Stream s,
bool  show_fullpaths,
bool  show_module 
)

◆ DumpLocationForAddress()

bool Variable::DumpLocationForAddress ( Stream s,
const Address address 
)

◆ GetDecl()

CompilerDecl Variable::GetDecl ( )

◆ GetDeclaration()

const Declaration& lldb_private::Variable::GetDeclaration ( ) const
inline

Definition at line 45 of file Variable.h.

References GetName(), GetUnqualifiedName(), and m_declaration.

Referenced by lldb_private::Address::Dump().

◆ GetDeclContext()

CompilerDeclContext Variable::GetDeclContext ( )

◆ GetLanguage()

lldb::LanguageType Variable::GetLanguage ( ) const

◆ GetLocationIsConstantValueData()

bool lldb_private::Variable::GetLocationIsConstantValueData ( ) const
inline

Definition at line 90 of file Variable.h.

References m_loc_is_const_data.

Referenced by lldb_private::ValueObjectVariable::UpdateValue().

◆ GetName()

ConstString Variable::GetName ( ) const

◆ GetScope()

lldb::ValueType lldb_private::Variable::GetScope ( ) const
inline

Definition at line 66 of file Variable.h.

References m_scope.

Referenced by lldb_private::SymbolContext::GetDescription().

◆ GetSymbolContextScope()

SymbolContextScope* lldb_private::Variable::GetSymbolContextScope ( ) const
inline

Definition at line 51 of file Variable.h.

References GetLanguage(), GetType(), m_owner_scope, and NameMatches().

Referenced by SymbolFileDWARF::GetGlobalAranges().

◆ GetType()

Type * Variable::GetType ( )

◆ GetUnqualifiedName()

ConstString Variable::GetUnqualifiedName ( ) const

Definition at line 71 of file Variable.cpp.

References m_name.

Referenced by GetDeclaration().

◆ GetValuesForVariableExpressionPath()

Status Variable::GetValuesForVariableExpressionPath ( llvm::StringRef  variable_expr_path,
ExecutionContextScope scope,
GetVariableCallback  callback,
void *  baton,
VariableList variable_list,
ValueObjectList valobj_list 
)
static

◆ IsArtificial()

bool lldb_private::Variable::IsArtificial ( ) const
inline

Definition at line 70 of file Variable.h.

References m_artificial.

◆ IsExternal()

bool lldb_private::Variable::IsExternal ( ) const
inline

Definition at line 68 of file Variable.h.

References m_external.

◆ IsInScope()

bool Variable::IsInScope ( StackFrame frame)

◆ IsStaticMember()

bool lldb_private::Variable::IsStaticMember ( ) const
inline

Definition at line 72 of file Variable.h.

References m_static_member.

◆ LocationExpression() [1/2]

DWARFExpression& lldb_private::Variable::LocationExpression ( )
inline

Definition at line 74 of file Variable.h.

References m_location.

Referenced by lldb_private::ValueObjectVariable::UpdateValue().

◆ LocationExpression() [2/2]

const DWARFExpression& lldb_private::Variable::LocationExpression ( ) const
inline

◆ LocationIsValidForAddress()

bool Variable::LocationIsValidForAddress ( const Address address)

◆ LocationIsValidForFrame()

bool Variable::LocationIsValidForFrame ( StackFrame frame)

◆ MemorySize()

size_t Variable::MemorySize ( ) const

Definition at line 198 of file Variable.cpp.

References Variable().

Referenced by LocationExpression().

◆ NameMatches() [1/2]

bool Variable::NameMatches ( ConstString  name) const

◆ NameMatches() [2/2]

bool Variable::NameMatches ( const RegularExpression regex) const

◆ SetLocationIsConstantValueData()

void lldb_private::Variable::SetLocationIsConstantValueData ( bool  b)
inline

Definition at line 92 of file Variable.h.

References m_loc_is_const_data.

Member Data Documentation

◆ m_artificial

uint8_t lldb_private::Variable::m_artificial
protected

Definition at line 122 of file Variable.h.

Referenced by Dump(), and IsArtificial().

◆ m_declaration

Declaration lldb_private::Variable::m_declaration
protected

Definition at line 119 of file Variable.h.

Referenced by Dump(), DumpDeclaration(), and GetDeclaration().

◆ m_external

uint8_t lldb_private::Variable::m_external
protected

Definition at line 122 of file Variable.h.

Referenced by Dump(), and IsExternal().

◆ m_loc_is_const_data

uint8_t lldb_private::Variable::m_loc_is_const_data
protected

Definition at line 122 of file Variable.h.

Referenced by GetLocationIsConstantValueData(), and SetLocationIsConstantValueData().

◆ m_location

DWARFExpression lldb_private::Variable::m_location
protected

◆ m_mangled

Mangled lldb_private::Variable::m_mangled
protected

Definition at line 111 of file Variable.h.

Referenced by GetName(), and NameMatches().

◆ m_name

ConstString lldb_private::Variable::m_name
protected

Definition at line 110 of file Variable.h.

Referenced by Dump(), GetName(), GetUnqualifiedName(), and NameMatches().

◆ m_owner_scope

SymbolContextScope* lldb_private::Variable::m_owner_scope
protected

◆ m_scope

lldb::ValueType lldb_private::Variable::m_scope
protected

Definition at line 114 of file Variable.h.

Referenced by Dump(), GetScope(), and IsInScope().

◆ m_scope_range

RangeList lldb_private::Variable::m_scope_range
protected

Definition at line 117 of file Variable.h.

Referenced by IsInScope().

◆ m_static_member

uint8_t lldb_private::Variable::m_static_member
protected

Definition at line 122 of file Variable.h.

Referenced by IsStaticMember().

◆ m_symfile_type_sp

lldb::SymbolFileTypeSP lldb_private::Variable::m_symfile_type_sp
protected

Definition at line 112 of file Variable.h.

Referenced by Dump(), and GetType().


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