File indexing completed on 2026-05-10 08:42:59
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLDB_VALUEOBJECT_VALUEOBJECTCONSTRESULTIMPL_H
0010 #define LLDB_VALUEOBJECT_VALUEOBJECTCONSTRESULTIMPL_H
0011
0012 #include "lldb/Utility/ConstString.h"
0013 #include "lldb/lldb-defines.h"
0014 #include "lldb/lldb-forward.h"
0015 #include "lldb/lldb-private-enumerations.h"
0016 #include "lldb/lldb-types.h"
0017
0018 #include <cstddef>
0019 #include <cstdint>
0020 namespace lldb_private {
0021 class CompilerType;
0022 class DataExtractor;
0023 class Status;
0024 class ValueObject;
0025 }
0026
0027 namespace lldb_private {
0028
0029
0030
0031
0032 class ValueObjectConstResultImpl {
0033 public:
0034 ValueObjectConstResultImpl(ValueObject *valobj,
0035 lldb::addr_t live_address = LLDB_INVALID_ADDRESS);
0036
0037 virtual ~ValueObjectConstResultImpl() = default;
0038
0039 lldb::ValueObjectSP Dereference(Status &error);
0040
0041 ValueObject *CreateChildAtIndex(size_t idx);
0042 ValueObject *CreateSyntheticArrayMember(size_t idx);
0043
0044 lldb::ValueObjectSP
0045 GetSyntheticChildAtOffset(uint32_t offset, const CompilerType &type,
0046 bool can_create,
0047 ConstString name_const_str = ConstString());
0048
0049 lldb::ValueObjectSP AddressOf(Status &error);
0050
0051 lldb::addr_t GetLiveAddress() { return m_live_address; }
0052
0053 lldb::ValueObjectSP Cast(const CompilerType &compiler_type);
0054
0055 void SetLiveAddress(lldb::addr_t addr = LLDB_INVALID_ADDRESS,
0056 AddressType address_type = eAddressTypeLoad) {
0057 m_live_address = addr;
0058 m_live_address_type = address_type;
0059 }
0060
0061 virtual lldb::addr_t GetAddressOf(bool scalar_is_load_address = true,
0062 AddressType *address_type = nullptr);
0063
0064 virtual size_t GetPointeeData(DataExtractor &data, uint32_t item_idx = 0,
0065 uint32_t item_count = 1);
0066
0067 private:
0068 ValueObject *m_impl_backend;
0069 lldb::addr_t m_live_address;
0070 AddressType m_live_address_type;
0071 lldb::ValueObjectSP m_address_of_backend;
0072
0073 ValueObjectConstResultImpl(const ValueObjectConstResultImpl &) = delete;
0074 const ValueObjectConstResultImpl &
0075 operator=(const ValueObjectConstResultImpl &) = delete;
0076 };
0077
0078 }
0079
0080 #endif