LLDB mainline
ValueObjectConstResultImpl.h
Go to the documentation of this file.
1//===-- ValueObjectConstResultImpl.h ----------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_VALUEOBJECT_VALUEOBJECTCONSTRESULTIMPL_H
10#define LLDB_VALUEOBJECT_VALUEOBJECTCONSTRESULTIMPL_H
11
14#include "lldb/lldb-defines.h"
15#include "lldb/lldb-forward.h"
17#include "lldb/lldb-types.h"
18
19#include <cstddef>
20#include <cstdint>
21namespace lldb_private {
22class CompilerType;
23class DataExtractor;
24class Status;
25} // namespace lldb_private
26
27namespace lldb_private {
28
29/// A class wrapping common implementation details for operations in
30/// ValueObjectConstResult ( & Child ) that may need to jump from the host
31/// memory space into the target's memory space.
33public:
35 lldb::addr_t live_address = LLDB_INVALID_ADDRESS);
36
37 virtual ~ValueObjectConstResultImpl() = default;
38
40
43
45 GetSyntheticChildAtOffset(uint32_t offset, const CompilerType &type,
46 bool can_create,
47 ConstString name_const_str = ConstString());
48
50
52
53 lldb::ValueObjectSP Cast(const CompilerType &compiler_type);
54
56 AddressType address_type = eAddressTypeLoad) {
57 m_live_address = addr;
58 m_live_address_type = address_type;
59 }
60
62 GetAddressOf(bool scalar_is_load_address = true);
63
64 virtual size_t GetPointeeData(DataExtractor &data, uint32_t item_idx = 0,
65 uint32_t item_count = 1);
66
67private:
69 /// The memory address in the inferior process that this ValueObject tracks.
70 /// This address is used to request additional memory when the actual data
71 /// size exceeds the initial local buffer size, such as when a dynamic type
72 /// resolution results in a type larger than its statically determined type.
76
80};
81
82} // namespace lldb_private
83
84#endif // LLDB_VALUEOBJECT_VALUEOBJECTCONSTRESULTIMPL_H
static llvm::raw_ostream & error(Stream &strm)
Generic representation of a type in a programming language.
A uniqued constant string class.
Definition ConstString.h:40
An data extractor class.
An error handling class.
Definition Status.h:118
lldb::ValueObjectSP GetSyntheticChildAtOffset(uint32_t offset, const CompilerType &type, bool can_create, ConstString name_const_str=ConstString())
virtual size_t GetPointeeData(DataExtractor &data, uint32_t item_idx=0, uint32_t item_count=1)
ValueObjectConstResultImpl(ValueObject *valobj, lldb::addr_t live_address=LLDB_INVALID_ADDRESS)
void SetLiveAddress(lldb::addr_t addr=LLDB_INVALID_ADDRESS, AddressType address_type=eAddressTypeLoad)
lldb::ValueObjectSP Cast(const CompilerType &compiler_type)
lldb::addr_t m_live_address
The memory address in the inferior process that this ValueObject tracks.
const ValueObjectConstResultImpl & operator=(const ValueObjectConstResultImpl &)=delete
ValueObjectConstResultImpl(const ValueObjectConstResultImpl &)=delete
virtual ValueObject::AddrAndType GetAddressOf(bool scalar_is_load_address=true)
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
@ eAddressTypeLoad
Address is an address as in the current target inferior process.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
uint64_t addr_t
Definition lldb-types.h:80