9#ifndef LLDB_EXPRESSION_EXPRESSIONVARIABLE_H
10#define LLDB_EXPRESSION_EXPRESSIONVARIABLE_H
16#include "llvm/ADT/DenseMap.h"
21#include "llvm/Support/ExtensibleRTTI.h"
26 :
public std::enable_shared_from_this<ExpressionVariable>,
27 public llvm::RTTIExtends<ExpressionVariable, llvm::RTTIRoot> {
58 m_frozen_sp->GetValue().SetCompilerType(compiler_type);
146 for (
size_t index = 0; index < size; ++index) {
163 for (
size_t index = 0, size =
GetSize(); index < size; ++index) {
165 if (var_sp->GetName() == name)
176 for (
size_t index = 0, size =
GetSize(); index < size; ++index) {
178 llvm::StringRef var_name_str = var_sp->GetName().GetStringRef();
179 if (var_name_str == name)
186 for (std::vector<lldb::ExpressionVariableSP>::iterator
190 if (vi->get() == var_sp.get()) {
205 public llvm::RTTIExtends<PersistentExpressionState, llvm::RTTIRoot> {
221 uint32_t addr_byte_size) = 0;
229 virtual std::optional<CompilerType>
237 virtual llvm::StringRef
245 typedef llvm::DenseMap<const char *, lldb::addr_t>
SymbolMap;
Generic representation of a type in a programming language.
A uniqued constant string class.
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
"lldb/Expression/ExpressionVariable.h" A list of variable references.
lldb::ExpressionVariableSP GetVariable(llvm::StringRef name)
lldb::ExpressionVariableSP AddNewlyConstructedVariable(ExpressionVariable *var)
size_t GetSize()
Implementation of methods in ExpressionVariableListBase.
std::vector< lldb::ExpressionVariableSP > m_variables
lldb::ExpressionVariableSP GetVariableAtIndex(size_t index)
lldb::ExpressionVariableSP GetVariable(ConstString name)
Finds a variable by name in the list.
size_t AddVariable(const lldb::ExpressionVariableSP &var_sp)
void RemoveVariable(lldb::ExpressionVariableSP var_sp)
bool ContainsVariable(const lldb::ExpressionVariableSP &var_sp)
lldb::ValueObjectSP m_live_sp
uint8_t * GetValueBytes()
lldb::ValueObjectSP m_frozen_sp
lldb::ValueObjectSP GetValueObject()
void SetName(ConstString name)
RegisterInfo * GetRegisterInfo()
std::optional< uint64_t > GetByteSize()
void TransferAddress(bool force=false)
void SetRegisterInfo(const RegisterInfo *reg_info)
static char ID
LLVM RTTI support.
virtual ~ExpressionVariable()=default
void SetCompilerType(const CompilerType &compiler_type)
@ EVTypeIsReference
The original type of this variable is a reference, so materialize the value rather than the location.
@ EVIsLLDBAllocated
This variable is resident in a location specifically allocated for it by LLDB in the target process.
@ EVNeedsFreezeDry
Copy from m_live_sp to m_frozen_sp during dematerialization.
@ EVNeedsAllocation
Space for this variable has yet to be allocated in the target process.
@ EVIsProgramReference
This variable is a reference to a (possibly invalid) area managed by the target program.
@ EVIsFreezeDried
This variable's authoritative version is in m_frozen_sp (for example, for statically-computed results...
@ EVBareRegister
This variable is a direct reference to $pc or some other entity.
@ EVKeepInTarget
Keep the allocation after the expression is complete rather than freeze drying its contents and freei...
CompilerType GetCompilerType()
virtual void RemovePersistentVariable(lldb::ExpressionVariableSP variable)=0
virtual lldb::ExpressionVariableSP CreatePersistentVariable(ExecutionContextScope *exe_scope, ConstString name, const CompilerType &type, lldb::ByteOrder byte_order, uint32_t addr_byte_size)=0
virtual llvm::StringRef GetPersistentVariablePrefix(bool is_error=false) const =0
llvm::DenseMap< const char *, lldb::addr_t > SymbolMap
virtual std::optional< CompilerType > GetCompilerTypeFromPersistentDecl(ConstString type_name)=0
void RegisterExecutionUnit(lldb::IRExecutionUnitSP &execution_unit_sp)
virtual lldb::ExpressionVariableSP CreatePersistentVariable(const lldb::ValueObjectSP &valobj_sp)=0
std::set< lldb::IRExecutionUnitSP > ExecutionUnitSet
static char ID
LLVM RTTI support.
ExecutionUnitSet m_execution_units
The execution units that contain valuable symbols.
virtual ~PersistentExpressionState()
SymbolMap m_symbol_map
The addresses of the symbols in m_execution_units.
PersistentExpressionState()
virtual ConstString GetNextPersistentVariableName(bool is_error=false)=0
Return a new persistent variable name with the specified prefix.
virtual lldb::addr_t LookupSymbol(ConstString name)
@ RegisterInfo
RegisterInfo * (can be a scalar or a vector register).
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::IRExecutionUnit > IRExecutionUnitSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::ExpressionVariable > ExpressionVariableSP
ByteOrder
Byte ordering definitions.
Every register is described in detail including its name, alternate name (optional),...