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

#include <Value.h>

Collaboration diagram for lldb_private::Value:
Collaboration graph
[legend]

Classes

struct  Vector
 

Public Types

enum  ValueType {
  eValueTypeScalar, eValueTypeVector, eValueTypeFileAddress, eValueTypeLoadAddress,
  eValueTypeHostAddress
}
 
enum  ContextType { eContextTypeInvalid, eContextTypeRegisterInfo, eContextTypeLLDBType, eContextTypeVariable }
 

Public Member Functions

 Value ()
 
 Value (const Scalar &scalar)
 
 Value (const Vector &vector)
 
 Value (const void *bytes, int len)
 
 Value (const Value &rhs)
 
void SetBytes (const void *bytes, int len)
 
void AppendBytes (const void *bytes, int len)
 
Valueoperator= (const Value &rhs)
 
const CompilerTypeGetCompilerType ()
 
void SetCompilerType (const CompilerType &compiler_type)
 
ValueType GetValueType () const
 
AddressType GetValueAddressType () const
 
ContextType GetContextType () const
 
void SetValueType (ValueType value_type)
 
void ClearContext ()
 
void SetContext (ContextType context_type, void *p)
 
RegisterInfo * GetRegisterInfo () const
 
TypeGetType ()
 
ScalarResolveValue (ExecutionContext *exe_ctx)
 
const ScalarGetScalar () const
 
const VectorGetVector () const
 
ScalarGetScalar ()
 
VectorGetVector ()
 
bool SetVectorBytes (const Vector &vector)
 
bool SetVectorBytes (uint8_t *bytes, size_t length, lldb::ByteOrder byte_order)
 
bool SetScalarFromVector ()
 
size_t ResizeData (size_t len)
 
size_t AppendDataToHostBuffer (const Value &rhs)
 
DataBufferHeapGetBuffer ()
 
const DataBufferHeapGetBuffer () const
 
bool ValueOf (ExecutionContext *exe_ctx)
 
VariableGetVariable ()
 
void Dump (Stream *strm)
 
lldb::Format GetValueDefaultFormat ()
 
uint64_t GetValueByteSize (Status *error_ptr, ExecutionContext *exe_ctx)
 
Status GetValueAsData (ExecutionContext *exe_ctx, DataExtractor &data, uint32_t data_offset, Module *module)
 
void ConvertToLoadAddress (Module *module, Target *target)
 Convert this value's file address to a load address, if possible. More...
 
bool GetData (DataExtractor &data)
 
void Clear ()
 

Static Public Member Functions

static const char * GetValueTypeAsCString (ValueType context_type)
 
static const char * GetContextTypeAsCString (ContextType context_type)
 

Static Public Attributes

static const size_t kMaxByteSize = 32u
 

Protected Attributes

Scalar m_value
 
Vector m_vector
 
CompilerType m_compiler_type
 
void * m_context
 
ValueType m_value_type
 
ContextType m_context_type
 
DataBufferHeap m_data_buffer
 

Detailed Description

Definition at line 48 of file Value.h.

Member Enumeration Documentation

◆ ContextType

Enumerator
eContextTypeInvalid 
eContextTypeRegisterInfo 
eContextTypeLLDBType 
eContextTypeVariable 

Definition at line 64 of file Value.h.

◆ ValueType

Enumerator
eValueTypeScalar 
eValueTypeVector 
eValueTypeFileAddress 
eValueTypeLoadAddress 
eValueTypeHostAddress 

Definition at line 52 of file Value.h.

Constructor & Destructor Documentation

◆ Value() [1/5]

Value::Value ( )

Definition at line 41 of file Value.cpp.

Referenced by lldb_private::Value::Vector::GetAsScalar().

◆ Value() [2/5]

Value::Value ( const Scalar scalar)

Definition at line 46 of file Value.cpp.

◆ Value() [3/5]

lldb_private::Value::Value ( const Vector vector)

◆ Value() [4/5]

Value::Value ( const void *  bytes,
int  len 
)

Definition at line 51 of file Value.cpp.

References SetBytes().

◆ Value() [5/5]

Value::Value ( const Value rhs)

Member Function Documentation

◆ AppendBytes()

void Value::AppendBytes ( const void *  bytes,
int  len 
)

◆ AppendDataToHostBuffer()

size_t Value::AppendDataToHostBuffer ( const Value rhs)

◆ Clear()

void Value::Clear ( )

◆ ClearContext()

void lldb_private::Value::ClearContext ( )
inline

Definition at line 156 of file Value.h.

References eContextTypeInvalid, m_context, and m_context_type.

Referenced by lldb_private::DWARFExpression::Evaluate().

◆ ConvertToLoadAddress()

void Value::ConvertToLoadAddress ( Module module,
Target target 
)

◆ Dump()

void Value::Dump ( Stream strm)

◆ GetBuffer() [1/2]

DataBufferHeap& lldb_private::Value::GetBuffer ( )
inline

Definition at line 208 of file Value.h.

References m_data_buffer.

Referenced by AppendDataToHostBuffer(), and lldb_private::DWARFExpression::Evaluate().

◆ GetBuffer() [2/2]

const DataBufferHeap& lldb_private::Value::GetBuffer ( ) const
inline

◆ GetCompilerType()

const CompilerType & Value::GetCompilerType ( )

◆ GetContextType()

ContextType lldb_private::Value::GetContextType ( ) const
inline

◆ GetContextTypeAsCString()

const char * Value::GetContextTypeAsCString ( ContextType  context_type)
static

Definition at line 657 of file Value.cpp.

References eContextTypeInvalid, eContextTypeLLDBType, eContextTypeRegisterInfo, and eContextTypeVariable.

Referenced by Dump(), and GetBuffer().

◆ GetData()

bool Value::GetData ( DataExtractor data)

◆ GetRegisterInfo()

RegisterInfo * Value::GetRegisterInfo ( ) const

◆ GetScalar() [1/2]

const Scalar& lldb_private::Value::GetScalar ( ) const
inline

Definition at line 178 of file Value.h.

References m_value.

Referenced by ConvertToLoadAddress(), PlatformPOSIX::DoLoadImage(), lldb_private::DWARFExpression::Evaluate(), lldb_private::FunctionCaller::FetchFunctionResults(), lldb_private::ClangExpressionDeclMap::FindExternalVisibleDecls(), lldb_private::ValueObject::GetAddressOf(), ABIMacOSX_arm::GetArgumentValues(), ABISysV_arm::GetArgumentValues(), ABISysV_arm64::GetArgumentValues(), ABISysV_ppc::GetArgumentValues(), ABIMacOSX_i386::GetArgumentValues(), ABISysV_ppc64::GetArgumentValues(), ABISysV_s390x::GetArgumentValues(), ABISysV_x86_64::GetArgumentValues(), ABIMacOSX_arm64::GetArgumentValues(), ABISysV_i386::GetArgumentValues(), lldb_private::AppleGetQueuesHandler::GetCurrentQueues(), lldb_private::AppleThreadPlanStepThroughObjCTrampoline::GetDescription(), lldb_private::ItaniumABILanguageRuntime::GetExceptionObjectForThread(), lldb_private::ValueObject::GetExpressionPath(), lldb_private::ClangExpressionDeclMap::GetFunctionInfo(), SymbolFileDWARF::GetGlobalAranges(), lldb_private::AppleGetItemInfoHandler::GetItemInfo(), lldb_private::ValueObject::GetLocationAsCStringImpl(), lldb_private::AppleObjCRuntime::GetObjectDescription(), lldb_private::AppleGetPendingItemsHandler::GetPendingItems(), lldb_private::ValueObject::GetPointeeData(), lldb_private::ValueObject::GetPointerValue(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_hexagon::GetReturnValueObjectImpl(), ABISysV_arm::GetReturnValueObjectImpl(), ABIMacOSX_arm::GetReturnValueObjectImpl(), ABIMacOSX_i386::GetReturnValueObjectImpl(), ABISysV_arm64::GetReturnValueObjectImpl(), ABIMacOSX_arm64::GetReturnValueObjectImpl(), ABISysV_s390x::GetReturnValueObjectSimple(), ABISysV_ppc::GetReturnValueObjectSimple(), ABISysV_x86_64::GetReturnValueObjectSimple(), ABISysV_i386::GetReturnValueObjectSimple(), lldb_private::AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(), lldb_private::AppleObjCRuntimeV2::GetTaggedPointerObfuscator(), lldb_private::AppleGetThreadItemInfoHandler::GetThreadItemInfo(), IRInterpreter::Interpret(), lldb_private::RegisterContextLLDB::IsTrapHandlerFrame(), lldb_private::ThreadPlanAssemblyTracer::Log(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), ObjCExceptionRecognizedStackFrame::ObjCExceptionRecognizedStackFrame(), ReadRegisterValueAsScalar(), lldb_private::ClangExpressionDeclMap::ResolveUnknownTypes(), lldb_private::ValueObject::SetData(), lldb_private::ValueObject::SetValueFromCString(), lldb_private::AppleThreadPlanStepThroughObjCTrampoline::ShouldStop(), lldb_private::RegisterContext::UpdateDynamicRegisterSize(), lldb_private::ValueObjectCast::UpdateValue(), lldb_private::ValueObjectChild::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), and lldb_private::ValueObjectDynamicValue::UpdateValue().

◆ GetScalar() [2/2]

Scalar& lldb_private::Value::GetScalar ( )
inline

Definition at line 182 of file Value.h.

References m_value.

◆ GetType()

Type * Value::GetType ( )

Definition at line 137 of file Value.cpp.

References eContextTypeLLDBType, m_context, and m_context_type.

Referenced by GetCompilerType(), and SetContext().

◆ GetValueAddressType()

AddressType Value::GetValueAddressType ( ) const

◆ GetValueAsData()

Status Value::GetValueAsData ( ExecutionContext exe_ctx,
DataExtractor data,
uint32_t  data_offset,
Module module 
)

Definition at line 316 of file Value.cpp.

References lldb_private::ConstString::AsCString(), lldb_private::Value::Vector::byte_order, lldb_private::Value::Vector::bytes, lldb_private::Variable::CalculateSymbolContext(), lldb_private::DataExtractor::Clear(), lldb_private::eAddressTypeFile, lldb_private::eAddressTypeHost, lldb_private::eAddressTypeLoad, eValueTypeFileAddress, eValueTypeHostAddress, eValueTypeLoadAddress, eValueTypeScalar, eValueTypeVector, lldb_private::Status::Fail(), lldb_private::ObjectFile::GetAddressByteSize(), lldb_private::ArchSpec::GetAddressByteSize(), lldb_private::Target::GetArchitecture(), lldb_private::ExecutionContext::GetBestExecutionContextScope(), lldb_private::ArchSpec::GetByteOrder(), lldb_private::ObjectFile::GetByteOrder(), lldb_private::Scalar::GetByteSize(), lldb_private::CompilerType::GetByteSize(), GetCompilerType(), lldb_private::Scalar::GetData(), lldb_private::Module::GetFileSpec(), lldb_private::Address::GetLoadAddress(), lldb_private::Variable::GetName(), lldb_private::Module::GetObjectFile(), lldb_private::FileSpec::GetPath(), lldb_private::CompilerType::GetPointerByteSize(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::ObjectFile::GetSectionList(), lldb_private::Target::GetSectionLoadList(), lldb_private::Process::GetState(), lldb_private::Process::GetTarget(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::ExecutionContext::GetTargetRef(), GetValueByteSize(), GetVariable(), lldb_private::endian::InlHostByteOrder(), lldb_private::Process::IsAlive(), lldb_private::SectionLoadList::IsEmpty(), lldb_private::CompilerType::IsValid(), lldb_private::Address::IsValid(), lldb_private::Value::Vector::length, LLDB_INVALID_ADDRESS, m_value, m_value_type, m_vector, lldb_private::SymbolContext::module_sp, lldb_private::DataExtractor::PeekData(), lldb_private::Target::ReadMemory(), lldb_private::Process::ReadMemory(), lldb_private::SectionLoadList::ResolveLoadAddress(), lldb_private::DataExtractor::SetAddressByteSize(), lldb_private::DataExtractor::SetByteOrder(), lldb_private::DataExtractor::SetData(), lldb_private::Status::SetErrorString(), lldb_private::Status::SetErrorStringWithFormat(), lldb_private::StateIsStoppedState(), UINT32_MAX, lldb_private::Scalar::ULongLong(), and lldb_private::DataExtractor::ValidOffsetForDataOfSize().

Referenced by lldb_private::ValueObject::CreateConstantValue(), GetBuffer(), lldb_private::ValueObject::GetData(), ResolveValue(), lldb_private::ValueObjectCast::UpdateValue(), lldb_private::ValueObjectChild::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), and lldb_private::AppleObjCTrampolineHandler::~AppleObjCTrampolineHandler().

◆ GetValueByteSize()

uint64_t Value::GetValueByteSize ( Status error_ptr,
ExecutionContext exe_ctx 
)

◆ GetValueDefaultFormat()

lldb::Format Value::GetValueDefaultFormat ( )

◆ GetValueType()

Value::ValueType Value::GetValueType ( ) const

◆ GetValueTypeAsCString()

const char * Value::GetValueTypeAsCString ( ValueType  context_type)
static

◆ GetVariable()

Variable * Value::GetVariable ( )

Definition at line 625 of file Value.cpp.

References eContextTypeVariable, m_context, and m_context_type.

Referenced by GetBuffer(), GetCompilerType(), and GetValueAsData().

◆ GetVector() [1/2]

const Vector& lldb_private::Value::GetVector ( ) const
inline

Definition at line 180 of file Value.h.

References m_vector.

◆ GetVector() [2/2]

Vector& lldb_private::Value::GetVector ( )
inline

Definition at line 184 of file Value.h.

References m_vector.

◆ operator=()

Value & Value::operator= ( const Value rhs)

◆ ResizeData()

size_t Value::ResizeData ( size_t  len)

◆ ResolveValue()

Scalar & Value::ResolveValue ( ExecutionContext exe_ctx)

◆ SetBytes()

void Value::SetBytes ( const void *  bytes,
int  len 
)

◆ SetCompilerType()

void Value::SetCompilerType ( const CompilerType compiler_type)

Definition at line 268 of file Value.cpp.

References m_compiler_type.

Referenced by PlatformPOSIX::DoLoadImage(), lldb_private::FunctionCaller::FetchFunctionResults(), lldb_private::ClangExpressionDeclMap::FindExternalVisibleDecls(), lldb_private::Value::Vector::GetAsScalar(), lldb_private::AppleObjCRuntime::GetBacktraceThreadFromException(), lldb_private::AppleGetQueuesHandler::GetCurrentQueues(), NSIndexPathSyntheticFrontEnd::Impl::InlinedIndexes::GetIndexAtIndex(), lldb_private::AppleGetItemInfoHandler::GetItemInfo(), lldb_private::AppleObjCRuntime::GetObjectDescription(), lldb_private::AppleGetPendingItemsHandler::GetPendingItems(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_arm::GetReturnValueObjectImpl(), ABIMacOSX_arm::GetReturnValueObjectImpl(), ABIMacOSX_i386::GetReturnValueObjectImpl(), ABISysV_arm64::GetReturnValueObjectImpl(), ABIMacOSX_arm64::GetReturnValueObjectImpl(), ABISysV_s390x::GetReturnValueObjectSimple(), ABISysV_ppc::GetReturnValueObjectSimple(), ABISysV_x86_64::GetReturnValueObjectSimple(), ABISysV_i386::GetReturnValueObjectSimple(), lldb_private::AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(), lldb_private::AppleObjCRuntimeV2::GetTaggedPointerObfuscator(), lldb_private::AppleGetThreadItemInfoHandler::GetThreadItemInfo(), lldb_private::ThreadPlanAssemblyTracer::Log(), PlatformPOSIX::MakeLoadImageUtilityFunction(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), ObjCExceptionRecognizedStackFrame::ObjCExceptionRecognizedStackFrame(), lldb_private::ClangExpressionDeclMap::ResolveUnknownTypes(), lldb_private::ValueObjectCast::UpdateValue(), lldb_private::ValueObjectChild::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ValueObjectCast::ValueObjectCast(), and lldb_private::AppleObjCTrampolineHandler::~AppleObjCTrampolineHandler().

◆ SetContext()

void lldb_private::Value::SetContext ( ContextType  context_type,
void *  p 
)
inline

◆ SetScalarFromVector()

bool lldb_private::Value::SetScalarFromVector ( )
inline

◆ SetValueType()

void lldb_private::Value::SetValueType ( ValueType  value_type)
inline

◆ SetVectorBytes() [1/2]

bool lldb_private::Value::SetVectorBytes ( const Vector vector)
inline

Definition at line 186 of file Value.h.

References lldb_private::Value::Vector::IsValid(), and m_vector.

◆ SetVectorBytes() [2/2]

bool lldb_private::Value::SetVectorBytes ( uint8_t *  bytes,
size_t  length,
lldb::ByteOrder  byte_order 
)
inline

Definition at line 191 of file Value.h.

References m_vector, and lldb_private::Value::Vector::SetBytes().

◆ ValueOf()

bool Value::ValueOf ( ExecutionContext exe_ctx)

Member Data Documentation

◆ kMaxByteSize

const size_t lldb_private::Value::kMaxByteSize = 32u
static

Definition at line 75 of file Value.h.

◆ m_compiler_type

CompilerType lldb_private::Value::m_compiler_type
protected

Definition at line 240 of file Value.h.

Referenced by Clear(), GetCompilerType(), operator=(), and SetCompilerType().

◆ m_context

void* lldb_private::Value::m_context
protected

◆ m_context_type

ContextType lldb_private::Value::m_context_type
protected

◆ m_data_buffer

DataBufferHeap lldb_private::Value::m_data_buffer
protected

◆ m_value

Scalar lldb_private::Value::m_value
protected

◆ m_value_type

ValueType lldb_private::Value::m_value_type
protected

◆ m_vector

Vector lldb_private::Value::m_vector
protected

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