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 return m_live_address;
57 SetLiveAddress(lldb::addr_t addr = LLDB_INVALID_ADDRESS,
58 AddressType address_type = eAddressTypeLoad)
60 m_live_address = addr;
61 m_live_address_type = address_type;
65 GetAddressOf (bool scalar_is_load_address = true,
66 AddressType *address_type = NULL);
69 GetPointeeData (DataExtractor& data,
70 uint32_t item_idx = 0,
71 uint32_t item_count = 1);
75 ValueObject *m_impl_backend;
76 lldb::addr_t m_live_address;
77 AddressType m_live_address_type;
78 lldb::ValueObjectSP m_load_addr_backend;
79 lldb::ValueObjectSP m_address_of_backend;
81 DISALLOW_COPY_AND_ASSIGN (ValueObjectConstResultImpl);
84 } // namespace lldb_private
86 #endif // liblldb_ValueObjectConstResultImpl_h_