| LLDB mainline
    | 
#include <Variable.h>
| Public Types | |
| typedef RangeVector< lldb::addr_t, lldb::addr_t > | RangeList | 
| 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 DWARFExpressionList &location, bool external, bool artificial, bool location_is_constant_data, bool static_member=false) | |
| Constructors and Destructors. | |
| virtual | ~Variable () | 
| void | Dump (Stream *s, bool show_context) const | 
| bool | DumpDeclaration (Stream *s, bool show_fullpaths, bool show_module) | 
| const Declaration & | GetDeclaration () const | 
| ConstString | GetName () const | 
| ConstString | GetUnqualifiedName () const | 
| SymbolContextScope * | GetSymbolContextScope () const | 
| bool | NameMatches (ConstString name) const | 
| Since a variable can have a basename "i" and also a mangled named "_ZN12_GLOBAL__N_11iE" and a demangled mangled name "(anonymous
namespace)::i", this function will allow a generic match function that can be called by commands and expression parsers to make sure we match anything we come across. | |
| bool | NameMatches (const RegularExpression ®ex) const | 
| Type * | GetType () | 
| lldb::LanguageType | GetLanguage () const | 
| lldb::ValueType | GetScope () const | 
| const RangeList & | GetScopeRange () const | 
| bool | IsExternal () const | 
| bool | IsArtificial () const | 
| bool | IsStaticMember () const | 
| DWARFExpressionList & | LocationExpressionList () | 
| const DWARFExpressionList & | LocationExpressionList () const | 
| bool | DumpLocations (Stream *s, const Address &address) | 
| size_t | MemorySize () const | 
| void | CalculateSymbolContext (SymbolContext *sc) | 
| bool | IsInScope (StackFrame *frame) | 
| bool | IsInScope (const Block &block, const Address &addr) | 
| Returns true if this variable is in scope at addr inside block. | |
| 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. | |
| ~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. | |
| 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 void | AutoComplete (const ExecutionContext &exe_ctx, CompletionRequest &request) | 
| Protected Attributes | |
| ConstString | m_name | 
| The basename of the variable (no namespaces). | |
| Mangled | m_mangled | 
| The mangled name of the variable. | |
| lldb::SymbolFileTypeSP | m_symfile_type_sp | 
| The type pointer of the variable (int, struct, class, etc) global, parameter, local. | |
| lldb::ValueType | m_scope | 
| SymbolContextScope * | m_owner_scope | 
| The symbol file scope that this variable was defined in. | |
| RangeList | m_scope_range | 
| The list of ranges inside the owner's scope where this variable is valid. | |
| Declaration | m_declaration | 
| Declaration location for this item. | |
| DWARFExpressionList | m_location_list | 
| The location of this variable that can be fed to DWARFExpression::Evaluate(). | |
| unsigned | m_external: 1 | 
| Visible outside the containing compile unit? | |
| unsigned | m_artificial: 1 | 
| Non-zero if the variable is not explicitly declared in source. | |
| unsigned | m_loc_is_const_data: 1 | 
| The m_location expression contains the constant variable value data, not a DWARF location. | |
| unsigned | m_static_member: 1 | 
| Non-zero if variable is static member of a class or struct. | |
| Protected Attributes inherited from lldb_private::UserID | |
| lldb::user_id_t | m_uid | 
| The user ID that uniquely identifies an object. | |
| Private Member Functions | |
| Variable (const Variable &rhs)=delete | |
| Variable & | operator= (const Variable &rhs)=delete | 
Definition at line 25 of file Variable.h.
| typedef size_t(* lldb_private::Variable::GetVariableCallback) (void *baton, const char *name, VariableList &var_list) | 
Definition at line 103 of file Variable.h.
Definition at line 27 of file Variable.h.
| 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 DWARFExpressionList & | location, | ||
| bool | external, | ||
| bool | artificial, | ||
| bool | location_is_constant_data, | ||
| bool | static_member = false ) | 
Constructors and Destructors.
| mangled | The mangled or fully qualified name of the variable. | 
Definition at line 40 of file Variable.cpp.
References m_artificial, m_declaration, m_external, m_loc_is_const_data, m_location_list, m_mangled, m_name, m_owner_scope, m_scope, m_scope_range, m_static_member, m_symfile_type_sp, and lldb_private::UserID::UserID().
Referenced by MemorySize(), operator=(), and Variable().
| 
 | virtualdefault | 
| 
 | privatedelete | 
References Variable().
| 
 | static | 
Definition at line 720 of file Variable.cpp.
References lldb_private::CompletionRequest::GetCursorArgumentPrefix(), lldb_private::ExecutionContext::GetFramePtr(), and PrivateAutoComplete().
Referenced by lldb_private::CommandCompletions::VariablePath().
| void Variable::CalculateSymbolContext | ( | SymbolContext * | sc | ) | 
Definition at line 208 of file Variable.cpp.
References lldb_private::SymbolContext::Clear(), m_owner_scope, and lldb_private::SymbolContext::variable.
Referenced by DumpLocations(), lldb_private::Value::GetValueAsData(), IsInScope(), LocationIsValidForAddress(), and lldb_private::ValueObjectVariable::UpdateValue().
Definition at line 104 of file Variable.cpp.
References lldb_private::Stream::AsRawOstream(), lldb_private::Type::DumpTypeName(), lldb::eDescriptionLevelBrief, lldb_private::Stream::EOL(), lldb::eValueTypeInvalid, lldb::eValueTypeVariableArgument, lldb::eValueTypeVariableGlobal, lldb::eValueTypeVariableLocal, lldb::eValueTypeVariableThreadLocal, lldb_private::ABI::FindPlugin(), lldb_private::Stream::Format(), lldb_private::UserID::GetID(), lldb_private::Stream::Indent(), m_artificial, m_declaration, m_external, m_location_list, m_name, m_owner_scope, m_scope, m_symfile_type_sp, lldb_private::Stream::Printf(), lldb_private::Stream::PutChar(), lldb_private::Stream::PutCString(), and lldb_private::UserID::UserID().
Definition at line 170 of file Variable.cpp.
References lldb_private::SymbolContext::block, lldb_private::LineEntry::Clear(), lldb_private::SymbolContext::DumpStopContext(), lldb_private::SymbolContext::function, lldb_private::SymbolContext::line_entry, m_declaration, m_owner_scope, and lldb_private::Stream::PutChar().
Definition at line 442 of file Variable.cpp.
References CalculateSymbolContext(), lldb::eDescriptionLevelBrief, lldb_private::ABI::FindPlugin(), lldb_private::SymbolContext::function, lldb_private::Function::GetAddress(), lldb_private::Address::GetFileAddress(), LLDB_INVALID_ADDRESS, m_location_list, and m_owner_scope.
| CompilerDecl Variable::GetDecl | ( | ) | 
Definition at line 203 of file Variable.cpp.
References lldb_private::SymbolFile::GetDeclForUID(), lldb_private::UserID::GetID(), lldb_private::Type::GetSymbolFile(), and GetType().
| 
 | inline | 
Definition at line 45 of file Variable.h.
References m_declaration.
| CompilerDeclContext Variable::GetDeclContext | ( | ) | 
Definition at line 196 of file Variable.cpp.
References lldb_private::SymbolFile::GetDeclContextContainingUID(), lldb_private::UserID::GetID(), lldb_private::Type::GetSymbolFile(), and GetType().
| lldb::LanguageType Variable::GetLanguage | ( | ) | const | 
Definition at line 56 of file Variable.cpp.
References lldb::eLanguageTypeUnknown, m_mangled, and m_owner_scope.
| 
 | inline | 
Definition at line 99 of file Variable.h.
References m_loc_is_const_data.
Referenced by lldb_private::ValueObjectVariable::UpdateValue().
| ConstString Variable::GetName | ( | ) | const | 
Definition at line 73 of file Variable.cpp.
References m_mangled, and m_name.
Referenced by lldb_private::Value::GetValueAsData().
| 
 | inline | 
Definition at line 66 of file Variable.h.
References m_scope.
| 
 | inline | 
Definition at line 68 of file Variable.h.
References m_scope_range.
Referenced by LocationIsValidForAddress().
| 
 | inline | 
Definition at line 51 of file Variable.h.
References m_owner_scope.
| Type * Variable::GetType | ( | ) | 
Definition at line 98 of file Variable.cpp.
References m_symfile_type_sp.
Referenced by lldb_private::Value::GetCompilerType(), GetDecl(), and GetDeclContext().
| ConstString Variable::GetUnqualifiedName | ( | ) | const | 
Definition at line 80 of file Variable.cpp.
References m_name.
| 
 | static | 
Definition at line 326 of file Variable.cpp.
References lldb_private::ValueObjectList::Append(), lldb_private::VariableList::Clear(), lldb_private::ValueObjectVariable::Create(), error(), lldb_private::RegularExpression::Execute(), lldb_private::Status::Fail(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormatv(), lldb_private::ValueObjectList::GetSize(), lldb_private::VariableList::GetSize(), lldb_private::ValueObjectList::GetValueObjectAtIndex(), GetValuesForVariableExpressionPath(), lldb_private::VariableList::GetVariableAtIndex(), lldb_private::ValueObjectList::RemoveValueObjectAtIndex(), lldb_private::VariableList::RemoveVariableAtIndex(), and lldb_private::ValueObjectList::SetValueObjectAtIndex().
Referenced by CommandObjectTargetVariable::DoExecute(), and GetValuesForVariableExpressionPath().
| 
 | inline | 
Definition at line 72 of file Variable.h.
References m_artificial.
| 
 | inline | 
Definition at line 70 of file Variable.h.
References m_external.
Returns true if this variable is in scope at addr inside block.
Definition at line 305 of file Variable.cpp.
References lldb_private::SymbolContext::block, CalculateSymbolContext(), lldb_private::Block::Contains(), lldb_private::Address::GetFileAddress(), and m_scope_range.
| bool Variable::IsInScope | ( | StackFrame * | frame | ) | 
Definition at line 274 of file Variable.cpp.
References lldb_private::SymbolContext::block, lldb::eValueTypeConstResult, lldb::eValueTypeRegister, lldb::eValueTypeRegisterSet, lldb::eValueTypeVariableArgument, lldb::eValueTypeVariableGlobal, lldb::eValueTypeVariableLocal, lldb::eValueTypeVariableStatic, lldb::eValueTypeVariableThreadLocal, lldb_private::StackFrame::GetFrameCodeAddress(), lldb_private::StackFrame::GetSymbolContext(), IsInScope(), and m_scope.
Referenced by lldb::SBFrame::FindValue(), lldb_private::StackFrame::GetInScopeVariableList(), and IsInScope().
| 
 | inline | 
Definition at line 74 of file Variable.h.
References m_static_member.
| 
 | inline | 
Definition at line 76 of file Variable.h.
References m_location_list.
Referenced by lldb_private::ValueObjectVariable::UpdateValue().
| 
 | inline | 
Definition at line 78 of file Variable.h.
References m_location_list.
Definition at line 238 of file Variable.cpp.
References CalculateSymbolContext(), lldb_private::RangeVector< B, S, N >::FindEntryThatContains(), lldb_private::SymbolContext::function, lldb_private::Function::GetAddress(), lldb_private::Address::GetFileAddress(), lldb_private::Address::GetModule(), GetScopeRange(), lldb_private::RangeVector< B, S, N >::IsEmpty(), lldb_private::Address::IsSectionOffset(), LLDB_INVALID_ADDRESS, m_location_list, and lldb_private::SymbolContext::module_sp.
Referenced by lldb_private::Address::Dump().
| bool Variable::LocationIsValidForFrame | ( | StackFrame * | frame | ) | 
Definition at line 216 of file Variable.cpp.
References lldb_private::StackFrame::CalculateTarget(), lldb_private::SymbolContext::function, lldb_private::Function::GetAddress(), lldb_private::StackFrame::GetFrameCodeAddressForSymbolication(), lldb_private::Address::GetLoadAddress(), lldb_private::StackFrame::GetSymbolContext(), LLDB_INVALID_ADDRESS, and m_location_list.
Referenced by lldb_private::StackFrame::GetInScopeVariableList().
| size_t Variable::MemorySize | ( | ) | const | 
Definition at line 194 of file Variable.cpp.
References Variable().
| bool Variable::NameMatches | ( | const RegularExpression & | regex | ) | const | 
Definition at line 90 of file Variable.cpp.
References lldb_private::RegularExpression::Execute(), m_mangled, and m_name.
| bool Variable::NameMatches | ( | ConstString | name | ) | const | 
Since a variable can have a basename "i" and also a mangled named "_ZN12_GLOBAL__N_11iE" and a demangled mangled name "(anonymous namespace)::i", this function will allow a generic match function that can be called by commands and expression parsers to make sure we match anything we come across.
Definition at line 82 of file Variable.cpp.
References m_mangled, m_name, and m_owner_scope.
References Variable().
| 
 | inline | 
Definition at line 101 of file Variable.h.
References m_loc_is_const_data.
| 
 | protected | 
Non-zero if the variable is not explicitly declared in source.
Definition at line 140 of file Variable.h.
Referenced by Dump(), IsArtificial(), and Variable().
| 
 | protected | 
Declaration location for this item.
Definition at line 133 of file Variable.h.
Referenced by Dump(), DumpDeclaration(), GetDeclaration(), and Variable().
| 
 | protected | 
Visible outside the containing compile unit?
Definition at line 138 of file Variable.h.
Referenced by Dump(), IsExternal(), and Variable().
| 
 | protected | 
The m_location expression contains the constant variable value data, not a DWARF location.
Definition at line 143 of file Variable.h.
Referenced by GetLocationIsConstantValueData(), SetLocationIsConstantValueData(), and Variable().
| 
 | protected | 
The location of this variable that can be fed to DWARFExpression::Evaluate().
Definition at line 136 of file Variable.h.
Referenced by Dump(), DumpLocations(), LocationExpressionList(), LocationExpressionList(), LocationIsValidForAddress(), LocationIsValidForFrame(), and Variable().
| 
 | protected | 
The mangled name of the variable.
Definition at line 122 of file Variable.h.
Referenced by GetLanguage(), GetName(), NameMatches(), NameMatches(), and Variable().
| 
 | protected | 
The basename of the variable (no namespaces).
Definition at line 120 of file Variable.h.
Referenced by Dump(), GetName(), GetUnqualifiedName(), NameMatches(), NameMatches(), and Variable().
| 
 | protected | 
The symbol file scope that this variable was defined in.
Definition at line 128 of file Variable.h.
Referenced by CalculateSymbolContext(), Dump(), DumpDeclaration(), DumpLocations(), GetLanguage(), GetSymbolContextScope(), NameMatches(), and Variable().
| 
 | protected | 
Definition at line 126 of file Variable.h.
Referenced by Dump(), GetScope(), IsInScope(), and Variable().
| 
 | protected | 
The list of ranges inside the owner's scope where this variable is valid.
Definition at line 131 of file Variable.h.
Referenced by GetScopeRange(), IsInScope(), and Variable().
| 
 | protected | 
Non-zero if variable is static member of a class or struct.
Definition at line 145 of file Variable.h.
Referenced by IsStaticMember(), and Variable().
| 
 | protected | 
The type pointer of the variable (int, struct, class, etc) global, parameter, local.
Definition at line 125 of file Variable.h.
Referenced by Dump(), GetType(), and Variable().