1 //===-- ValueObjectConstResultImpl.h -----------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_ValueObjectConstResultImpl_h_
11 #define liblldb_ValueObjectConstResultImpl_h_
15 // Other libraries and framework includes
17 #include "lldb/Core/ValueObject.h"
19 namespace lldb_private {
21 //----------------------------------------------------------------------
22 // A class wrapping common implementation details for operations in
23 // ValueObjectConstResult ( & Child ) that may need to jump from the host
24 // memory space into the target's memory space
25 //----------------------------------------------------------------------
26 class ValueObjectConstResultImpl
30 ValueObjectConstResultImpl (ValueObject* valobj,
31 lldb::addr_t live_address = LLDB_INVALID_ADDRESS);
34 ~ValueObjectConstResultImpl()
39 Dereference (Error &error);
42 CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index);
45 GetSyntheticChildAtOffset (uint32_t offset, const ClangASTType& type, bool can_create);
48 AddressOf (Error &error);
53 m_impl_backend->UpdateValueIfNeeded(false);
54 return (m_impl_backend->GetValue().GetValueType() == Value::eValueTypeHostAddress);
60 return m_live_address;
64 SetLiveAddress(lldb::addr_t addr = LLDB_INVALID_ADDRESS,
65 AddressType address_type = eAddressTypeLoad)
67 m_live_address = addr;
68 m_live_address_type = address_type;
75 GetAddressOf (bool scalar_is_load_address = true,
76 AddressType *address_type = NULL);
79 GetPointeeData (DataExtractor& data,
80 uint32_t item_idx = 0,
81 uint32_t item_count = 1);
85 ValueObject *m_impl_backend;
86 lldb::addr_t m_live_address;
87 AddressType m_live_address_type;
88 lldb::ValueObjectSP m_load_addr_backend;
89 lldb::ValueObjectSP m_address_of_backend;
91 DISALLOW_COPY_AND_ASSIGN (ValueObjectConstResultImpl);
94 } // namespace lldb_private
96 #endif // liblldb_ValueObjectConstResultImpl_h_