LLDB  mainline
LibCxx.h
Go to the documentation of this file.
1 //===-- LibCxx.h ---------------------------------------------------*- C++
2 //-*-===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLDB_SOURCE_PLUGINS_LANGUAGE_CPLUSPLUS_LIBCXX_H
11 #define LLDB_SOURCE_PLUGINS_LANGUAGE_CPLUSPLUS_LIBCXX_H
12 
13 #include "lldb/Core/ValueObject.h"
16 #include "lldb/Utility/Stream.h"
17 
18 namespace lldb_private {
19 namespace formatters {
20 
22  ValueObject &valobj, Stream &stream,
23  const TypeSummaryOptions &summary_options); // libc++ std::string
24 
26  ValueObject &valobj, Stream &stream,
27  const TypeSummaryOptions &summary_options); // libc++ std::u16string
28 
30  ValueObject &valobj, Stream &stream,
31  const TypeSummaryOptions &summary_options); // libc++ std::u32string
32 
34  ValueObject &valobj, Stream &stream,
35  const TypeSummaryOptions &options); // libc++ std::wstring
36 
38  ValueObject &valueObj, Stream &stream,
39  const TypeSummaryOptions &summary_options); // libc++ std::string_view
40 
42  ValueObject &valobj, Stream &stream,
43  const TypeSummaryOptions &summary_options); // libc++ std::u16string_view
44 
46  ValueObject &valobj, Stream &stream,
47  const TypeSummaryOptions &summary_options); // libc++ std::u32string_view
48 
50  ValueObject &valobj, Stream &stream,
51  const TypeSummaryOptions &options); // libc++ std::wstring_view
52 
54  ValueObject &valobj, Stream &stream,
55  const TypeSummaryOptions &options); // libc++ std::optional<>
56 
58  ValueObject &valobj, Stream &stream,
59  const TypeSummaryOptions
60  &options); // libc++ std::shared_ptr<> and std::weak_ptr<>
61 
62 // libc++ std::unique_ptr<>
63 bool LibcxxUniquePointerSummaryProvider(ValueObject &valobj, Stream &stream,
64  const TypeSummaryOptions &options);
65 
67  ValueObject &valobj, Stream &stream,
68  const TypeSummaryOptions &options); // libc++ std::function<>
69 
70 SyntheticChildrenFrontEnd *
71 LibcxxVectorBoolSyntheticFrontEndCreator(CXXSyntheticChildren *,
72  lldb::ValueObjectSP);
73 
74 bool LibcxxContainerSummaryProvider(ValueObject &valobj, Stream &stream,
75  const TypeSummaryOptions &options);
76 
78 public:
79  LibCxxMapIteratorSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp);
80 
81  size_t CalculateNumChildren() override;
82 
83  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override;
84 
85  bool Update() override;
86 
87  bool MightHaveChildren() override;
88 
89  size_t GetIndexOfChildWithName(ConstString name) override;
90 
92 
93 private:
95  lldb::ValueObjectSP m_pair_sp;
96 };
97 
100  lldb::ValueObjectSP);
101 
104  lldb::ValueObjectSP);
105 
107 public:
108  LibcxxSharedPtrSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp);
109 
110  size_t CalculateNumChildren() override;
111 
112  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override;
113 
114  bool Update() override;
115 
116  bool MightHaveChildren() override;
117 
118  size_t GetIndexOfChildWithName(ConstString name) override;
119 
121 
122 private:
124 };
125 
127 public:
128  LibcxxUniquePtrSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp);
129 
130  size_t CalculateNumChildren() override;
131 
132  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override;
133 
134  bool Update() override;
135 
136  bool MightHaveChildren() override;
137 
138  size_t GetIndexOfChildWithName(ConstString name) override;
139 
141 
142 private:
143  lldb::ValueObjectSP m_value_ptr_sp;
144 };
145 
148  lldb::ValueObjectSP);
149 
152  lldb::ValueObjectSP);
153 
156  lldb::ValueObjectSP);
157 
160  lldb::ValueObjectSP);
161 
164  lldb::ValueObjectSP);
165 
168  lldb::ValueObjectSP);
169 
172  lldb::ValueObjectSP);
173 
176  lldb::ValueObjectSP);
177 
180  lldb::ValueObjectSP);
181 
183  lldb::ValueObjectSP);
184 
186  lldb::ValueObjectSP);
187 
190  lldb::ValueObjectSP valobj_sp);
191 
194  lldb::ValueObjectSP valobj_sp);
195 
196 } // namespace formatters
197 } // namespace lldb_private
198 
199 #endif // LLDB_SOURCE_PLUGINS_LANGUAGE_CPLUSPLUS_LIBCXX_H
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::m_pair_sp
lldb::ValueObjectSP m_pair_sp
Definition: LibCxx.h:95
lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibcxxStdUnorderedMapSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxUnorderedMap.cpp:220
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::~LibCxxMapIteratorSyntheticFrontEnd
~LibCxxMapIteratorSyntheticFrontEnd() override
Definition: LibCxx.cpp:350
lldb_private::formatters::LibcxxStringSummaryProviderUTF16
bool LibcxxStringSummaryProviderUTF16(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:830
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::GetIndexOfChildWithName
size_t GetIndexOfChildWithName(ConstString name) override
Definition: LibCxx.cpp:448
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::CalculateNumChildren
size_t CalculateNumChildren() override
Definition: LibCxx.cpp:321
lldb_private::formatters::LibcxxStringSummaryProviderUTF32
bool LibcxxStringSummaryProviderUTF32(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:837
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::GetChildAtIndex
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
Definition: LibCxx.cpp:326
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd::m_value_ptr_sp
lldb::ValueObjectSP m_value_ptr_sp
Definition: LibCxx.h:143
lldb_private::SyntheticChildrenFrontEnd
Definition: TypeSynthetic.h:27
lldb_private::formatters::LibcxxStdMapSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibcxxStdMapSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxMap.cpp:459
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd::LibcxxUniquePtrSyntheticFrontEnd
LibcxxUniquePtrSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition: LibCxx.cpp:467
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::m_pair_ptr
ValueObject * m_pair_ptr
Definition: LibCxx.h:94
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibCxxMapIteratorSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxx.cpp:356
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::CalculateNumChildren
size_t CalculateNumChildren() override
Definition: LibCxx.cpp:390
lldb_private::formatters::LibcxxWStringSummaryProvider
bool LibcxxWStringSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:736
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::LibcxxSharedPtrSyntheticFrontEnd
LibcxxSharedPtrSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition: LibCxx.cpp:383
lldb_private::formatters::LibcxxStringViewSummaryProviderASCII
bool LibcxxStringViewSummaryProviderASCII(ValueObject &valueObj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:884
lldb_private::formatters::LibcxxStdVectorSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibcxxStdVectorSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxVector.cpp:284
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::Update
bool Update() override
Definition: LibCxx.cpp:423
lldb_private::formatters::LibcxxFunctionSummaryProvider
bool LibcxxFunctionSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:58
lldb_private::formatters::LibcxxSmartPointerSummaryProvider
bool LibcxxSmartPointerSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:106
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::GetChildAtIndex
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
Definition: LibCxx.cpp:395
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd::~LibcxxUniquePtrSyntheticFrontEnd
~LibcxxUniquePtrSyntheticFrontEnd() override
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::Update
bool Update() override
Definition: LibCxx.cpp:215
lldb_private::ConstString
Definition: ConstString.h:40
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd
Definition: LibCxx.h:126
lldb_private::formatters::LibcxxStringSummaryProviderASCII
bool LibcxxStringSummaryProviderASCII(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:823
lldb_private::formatters::LibcxxInitializerListSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibcxxInitializerListSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxInitializerList.cpp:117
lldb_private::formatters::LibcxxBitsetSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibcxxBitsetSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: GenericBitset.cpp:143
lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibcxxVectorBoolSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
ValueObject.h
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd::Update
bool Update() override
Definition: LibCxx.cpp:508
lldb_private::formatters::LibcxxStringViewSummaryProviderUTF16
bool LibcxxStringViewSummaryProviderUTF16(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:891
lldb_private::formatters::LibcxxStdListSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibcxxStdListSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxList.cpp:424
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::m_cntrl
ValueObject * m_cntrl
Definition: LibCxx.h:123
lldb_private::ValueObject
ValueObject:
Definition: ValueObject.h:105
lldb_private::formatters::LibcxxContainerSummaryProvider
bool LibcxxContainerSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:537
lldb_private::formatters::LibcxxStdForwardListSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibcxxStdForwardListSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxList.cpp:430
TypeSummary.h
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::~LibcxxSharedPtrSyntheticFrontEnd
~LibcxxSharedPtrSyntheticFrontEnd() override
TypeSynthetic.h
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibcxxUniquePtrSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxx.cpp:477
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibcxxSharedPtrSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxx.cpp:460
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::GetIndexOfChildWithName
size_t GetIndexOfChildWithName(ConstString name) override
Definition: LibCxx.cpp:341
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd::MightHaveChildren
bool MightHaveChildren() override
Definition: LibCxx.cpp:524
lldb_private::formatters::LibcxxStringViewSummaryProviderUTF32
bool LibcxxStringViewSummaryProviderUTF32(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:898
lldb_private::formatters::LibcxxQueueFrontEndCreator
SyntheticChildrenFrontEnd * LibcxxQueueFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxQueue.cpp:60
lldb_private::formatters::LibcxxVariantFrontEndCreator
SyntheticChildrenFrontEnd * LibcxxVariantFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP valobj_sp)
Definition: LibCxxVariant.cpp:249
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd::GetIndexOfChildWithName
size_t GetIndexOfChildWithName(ConstString name) override
Definition: LibCxx.cpp:529
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd::GetChildAtIndex
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
Definition: LibCxx.cpp:489
lldb_private::formatters::LibcxxUniquePointerSummaryProvider
bool LibcxxUniquePointerSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:149
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::formatters::LibcxxOptionalSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibcxxOptionalSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP valobj_sp)
Definition: GenericOptional.cpp:133
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::MightHaveChildren
bool MightHaveChildren() override
Definition: LibCxx.cpp:336
lldb_private::formatters::LibCxxVectorIteratorSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibCxxVectorIteratorSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxx.cpp:372
Stream.h
lldb_private::formatters::LibcxxWStringViewSummaryProvider
bool LibcxxWStringViewSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:905
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd::CalculateNumChildren
size_t CalculateNumChildren() override
Definition: LibCxx.cpp:484
lldb_private::CXXSyntheticChildren
Definition: TypeSynthetic.h:358
lldb_private::formatters::LibcxxOptionalSummaryProvider
bool LibcxxOptionalSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:36
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd
Definition: LibCxx.h:106
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd
Definition: LibCxx.h:77
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::MightHaveChildren
bool MightHaveChildren() override
Definition: LibCxx.cpp:443
lldb_private::formatters::LibcxxTupleFrontEndCreator
SyntheticChildrenFrontEnd * LibcxxTupleFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxTuple.cpp:88
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::LibCxxMapIteratorSyntheticFrontEnd
LibCxxMapIteratorSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition: LibCxx.cpp:209