Skip to content

Commit cd28fca

Browse files
committed
[NFC][lldb] Document a few ivars on the value object system.
1 parent bda1976 commit cd28fca

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

lldb/include/lldb/Expression/ExpressionVariable.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,14 @@ class ExpressionVariable
108108
FlagType m_flags; // takes elements of Flags
109109

110110
// these should be private
111+
/// A value object whose value's data lives in host (lldb's) memory.
111112
lldb::ValueObjectSP m_frozen_sp;
113+
/// The ValueObject counterpart to m_frozen_sp that tracks the value in
114+
/// inferior memory. This object may not always exist; its presence depends on
115+
/// whether it is logical for the value to exist in the inferior memory. For
116+
/// example, when evaluating a C++ expression that generates an r-value, such
117+
/// as a single function call, there is no memory address in the inferior to
118+
/// track.
112119
lldb::ValueObjectSP m_live_sp;
113120
};
114121

lldb/include/lldb/ValueObject/ValueObjectConstResultImpl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ class ValueObjectConstResultImpl {
6666

6767
private:
6868
ValueObject *m_impl_backend;
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.
6973
lldb::addr_t m_live_address;
7074
AddressType m_live_address_type;
7175
lldb::ValueObjectSP m_address_of_backend;

lldb/source/Expression/Materializer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,7 @@ class EntityResultVariable : public Materializer::Entity {
11871187

11881188
private:
11891189
CompilerType m_type;
1190+
/// If this result entity can (and should) track the value on inferior memory.
11901191
bool m_is_program_reference;
11911192
bool m_keep_in_memory;
11921193

0 commit comments

Comments
 (0)