LLDB mainline
|
"lldb/Expression/ClangExpressionVariable.h" Encapsulates one variable for the expression parser. More...
#include <ClangExpressionVariable.h>
Classes | |
struct | JITVars |
The following values are valid if the variable is used by JIT code. More... | |
class | ParserVars |
The following values should not live beyond parsing. More... | |
Public Member Functions | |
ClangExpressionVariable (ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size) | |
ClangExpressionVariable (ExecutionContextScope *exe_scope, Value &value, ConstString name, uint16_t flags=EVNone) | |
ClangExpressionVariable (const lldb::ValueObjectSP &valobj_sp) | |
ClangExpressionVariable (ExecutionContextScope *exe_scope, ConstString name, const TypeFromUser &user_type, lldb::ByteOrder byte_order, uint32_t addr_byte_size) | |
bool | PointValueAtData (Value &value, ExecutionContext *exe_ctx) |
If the variable contains its own data, make a Value point at it. | |
void | EnableParserVars (uint64_t parser_id) |
Make this variable usable by the parser by allocating space for parser- specific variables. | |
void | DisableParserVars (uint64_t parser_id) |
Deallocate parser-specific variables. | |
ParserVars * | GetParserVars (uint64_t parser_id) |
Access parser-specific variables. | |
void | EnableJITVars (uint64_t parser_id) |
Make this variable usable for materializing for the JIT by allocating space for JIT-specific variables. | |
void | DisableJITVars (uint64_t parser_id) |
Deallocate JIT-specific variables. | |
JITVars * | GetJITVars (uint64_t parser_id) |
TypeFromUser | GetTypeFromUser () |
ClangExpressionVariable (const ClangExpressionVariable &)=delete | |
Members. | |
const ClangExpressionVariable & | operator= (const ClangExpressionVariable &)=delete |
Static Public Member Functions | |
static ClangExpressionVariable * | FindVariableInList (ExpressionVariableList &list, const clang::NamedDecl *decl, uint64_t parser_id) |
Utility functions for dealing with ExpressionVariableLists in Clang- specific ways. | |
Static Public Attributes | |
static char | ID |
Private Types | |
typedef std::map< uint64_t, ParserVars > | ParserVarMap |
typedef std::map< uint64_t, JITVars > | JITVarMap |
Private Attributes | |
ParserVarMap | m_parser_vars |
JITVarMap | m_jit_vars |
"lldb/Expression/ClangExpressionVariable.h" Encapsulates one variable for the expression parser.
The expression parser uses variables in three different contexts:
First, it stores persistent variables along with the process for use in expressions. These persistent variables contain their own data and are typed.
Second, in an interpreted expression, it stores the local variables for the expression along with the expression. These variables contain their own data and are typed.
Third, in a JIT-compiled expression, it stores the variables that the expression needs to have materialized and dematerialized at each execution. These do not contain their own data but are named and typed.
This class supports all of these use cases using simple type polymorphism, and provides necessary support methods. Its interface is RTTI-neutral.
Definition at line 60 of file ClangExpressionVariable.h.
|
private |
Definition at line 180 of file ClangExpressionVariable.h.
|
private |
Definition at line 145 of file ClangExpressionVariable.h.
ClangExpressionVariable::ClangExpressionVariable | ( | ExecutionContextScope * | exe_scope, |
lldb::ByteOrder | byte_order, | ||
uint32_t | addr_byte_size | ||
) |
Definition at line 25 of file ClangExpressionVariable.cpp.
References lldb_private::ValueObjectConstResult::Create().
ClangExpressionVariable::ClangExpressionVariable | ( | ExecutionContextScope * | exe_scope, |
Value & | value, | ||
ConstString | name, | ||
uint16_t | flags = EVNone |
||
) |
Definition at line 34 of file ClangExpressionVariable.cpp.
References lldb_private::ValueObjectConstResult::Create().
ClangExpressionVariable::ClangExpressionVariable | ( | const lldb::ValueObjectSP & | valobj_sp | ) |
Definition at line 42 of file ClangExpressionVariable.cpp.
ClangExpressionVariable::ClangExpressionVariable | ( | ExecutionContextScope * | exe_scope, |
ConstString | name, | ||
const TypeFromUser & | user_type, | ||
lldb::ByteOrder | byte_order, | ||
uint32_t | addr_byte_size | ||
) |
Definition at line 49 of file ClangExpressionVariable.cpp.
References lldb_private::ValueObjectConstResult::Create().
|
delete |
Members.
|
inline |
Deallocate JIT-specific variables.
Definition at line 191 of file ClangExpressionVariable.h.
References m_jit_vars.
|
inline |
Deallocate parser-specific variables.
Definition at line 156 of file ClangExpressionVariable.h.
References m_parser_vars.
|
inline |
Make this variable usable for materializing for the JIT by allocating space for JIT-specific variables.
Definition at line 186 of file ClangExpressionVariable.h.
References m_jit_vars.
Referenced by lldb_private::ClangExpressionDeclMap::AddPersistentVariable().
|
inline |
Make this variable usable by the parser by allocating space for parser- specific variables.
Definition at line 151 of file ClangExpressionVariable.h.
References m_parser_vars.
Referenced by lldb_private::ClangExpressionDeclMap::AddExpressionVariable(), lldb_private::ClangExpressionDeclMap::AddOneFunction(), lldb_private::ClangExpressionDeclMap::AddOneGenericVariable(), lldb_private::ClangExpressionDeclMap::AddOneRegister(), and lldb_private::ClangExpressionDeclMap::AddPersistentVariable().
|
inlinestatic |
Utility functions for dealing with ExpressionVariableLists in Clang- specific ways.
Finds a variable by NamedDecl in the list.
Definition at line 87 of file ClangExpressionVariable.h.
References lldb_private::ExpressionVariableList::GetSize(), lldb_private::ExpressionVariableList::GetVariableAtIndex(), and lldb_private::ClangExpressionVariable::ParserVars::m_named_decl.
Referenced by lldb_private::ClangExpressionDeclMap::AddValueToStruct(), and lldb_private::ClangExpressionDeclMap::GetFunctionInfo().
|
inline |
Definition at line 193 of file ClangExpressionVariable.h.
References m_jit_vars.
Referenced by lldb_private::ClangExpressionDeclMap::AddPersistentVariable().
|
inline |
Access parser-specific variables.
Definition at line 159 of file ClangExpressionVariable.h.
References m_parser_vars.
Referenced by lldb_private::ClangExpressionDeclMap::AddExpressionVariable(), lldb_private::ClangExpressionDeclMap::AddOneFunction(), lldb_private::ClangExpressionDeclMap::AddOneGenericVariable(), lldb_private::ClangExpressionDeclMap::AddOneRegister(), lldb_private::ClangExpressionDeclMap::AddPersistentVariable(), and lldb_private::ClangExpressionDeclMap::GetFunctionInfo().
TypeFromUser ClangExpressionVariable::GetTypeFromUser | ( | ) |
Definition at line 61 of file ClangExpressionVariable.cpp.
|
delete |
bool lldb_private::ClangExpressionVariable::PointValueAtData | ( | Value & | value, |
ExecutionContext * | exe_ctx | ||
) |
If the variable contains its own data, make a Value point at it.
If exe_ctx in not NULL, the value will be resolved in with that execution context.
[in] | value | The value to point at the data. |
[in] | exe_ctx | The execution context to use to resolve value. |
|
static |
Definition at line 64 of file ClangExpressionVariable.h.
|
private |
Definition at line 181 of file ClangExpressionVariable.h.
Referenced by DisableJITVars(), EnableJITVars(), and GetJITVars().
|
private |
Definition at line 146 of file ClangExpressionVariable.h.
Referenced by DisableParserVars(), EnableParserVars(), and GetParserVars().