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 &valobj, Stream &stream,
39  const TypeSummaryOptions &options); // libc++ std::optional<>
40 
42  ValueObject &valobj, Stream &stream,
43  const TypeSummaryOptions
44  &options); // libc++ std::shared_ptr<> and std::weak_ptr<>
45 
46 // libc++ std::unique_ptr<>
47 bool LibcxxUniquePointerSummaryProvider(ValueObject &valobj, Stream &stream,
48  const TypeSummaryOptions &options);
49 
51  ValueObject &valobj, Stream &stream,
52  const TypeSummaryOptions &options); // libc++ std::function<>
53 
54 SyntheticChildrenFrontEnd *
55 LibcxxVectorBoolSyntheticFrontEndCreator(CXXSyntheticChildren *,
56  lldb::ValueObjectSP);
57 
58 bool LibcxxContainerSummaryProvider(ValueObject &valobj, Stream &stream,
59  const TypeSummaryOptions &options);
60 
62 public:
63  LibCxxMapIteratorSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp);
64 
65  size_t CalculateNumChildren() override;
66 
67  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override;
68 
69  bool Update() override;
70 
71  bool MightHaveChildren() override;
72 
73  size_t GetIndexOfChildWithName(ConstString name) override;
74 
76 
77 private:
79  lldb::ValueObjectSP m_pair_sp;
80 };
81 
84  lldb::ValueObjectSP);
85 
88  lldb::ValueObjectSP);
89 
91 public:
92  LibcxxSharedPtrSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp);
93 
94  size_t CalculateNumChildren() override;
95 
96  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override;
97 
98  bool Update() override;
99 
100  bool MightHaveChildren() override;
101 
102  size_t GetIndexOfChildWithName(ConstString name) override;
103 
105 
106 private:
108  lldb::ValueObjectSP m_count_sp;
109  lldb::ValueObjectSP m_weak_count_sp;
110  uint8_t m_ptr_size;
112 };
113 
115 public:
116  LibcxxUniquePtrSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp);
117 
118  size_t CalculateNumChildren() override;
119 
120  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override;
121 
122  bool Update() override;
123 
124  bool MightHaveChildren() override;
125 
126  size_t GetIndexOfChildWithName(ConstString name) override;
127 
129 
130 private:
131  lldb::ValueObjectSP m_compressed_pair_sp;
132 };
133 
136  lldb::ValueObjectSP);
137 
140  lldb::ValueObjectSP);
141 
144  lldb::ValueObjectSP);
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 
171  lldb::ValueObjectSP);
172 
174  lldb::ValueObjectSP);
175 
178  lldb::ValueObjectSP valobj_sp);
179 
182  lldb::ValueObjectSP valobj_sp);
183 
184 } // namespace formatters
185 } // namespace lldb_private
186 
187 #endif // LLDB_SOURCE_PLUGINS_LANGUAGE_CPLUSPLUS_LIBCXX_H
bool LibcxxUniquePointerSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:147
SyntheticChildrenFrontEnd * LibCxxVectorIteratorSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxx.cpp:370
A class that represents a running process on the host machine.
bool LibcxxStringSummaryProviderUTF16(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:799
bool LibcxxWStringSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:661
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
Definition: LibCxx.cpp:324
bool LibcxxStringSummaryProviderUTF32(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:806
bool LibcxxOptionalSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:34
SyntheticChildrenFrontEnd * LibCxxMapIteratorSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxx.cpp:354
SyntheticChildrenFrontEnd * LibcxxStdForwardListSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxList.cpp:432
SyntheticChildrenFrontEnd * LibcxxVectorBoolSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
SyntheticChildrenFrontEnd * LibcxxTupleFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxTuple.cpp:88
bool LibcxxContainerSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:550
SyntheticChildrenFrontEnd * LibcxxStdVectorSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
SyntheticChildrenFrontEnd * LibcxxUniquePtrSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxx.cpp:500
ByteOrder
Byte ordering definitions.
bool LibcxxStringSummaryProviderASCII(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:792
SyntheticChildrenFrontEnd * LibcxxStdMapSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxMap.cpp:462
SyntheticChildrenFrontEnd * LibcxxSharedPtrSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxx.cpp:483
size_t GetIndexOfChildWithName(ConstString name) override
Definition: LibCxx.cpp:339
SyntheticChildrenFrontEnd * LibcxxStdListSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxList.cpp:426
SyntheticChildrenFrontEnd * LibcxxOptionalFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP valobj_sp)
SyntheticChildrenFrontEnd * LibcxxStdUnorderedMapSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
A uniqued constant string class.
Definition: ConstString.h:40
bool LibcxxFunctionSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:56
LibCxxMapIteratorSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition: LibCxx.cpp:207
SyntheticChildrenFrontEnd * LibcxxVariantFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP valobj_sp)
SyntheticChildrenFrontEnd * LibcxxQueueFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxQueue.cpp:60
SyntheticChildrenFrontEnd * LibcxxInitializerListSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
bool LibcxxSmartPointerSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:104
SyntheticChildrenFrontEnd * LibcxxBitsetSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)