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 liblldb_LibCxx_h_
11 #define liblldb_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 
47  ValueObject &valobj, Stream &stream,
48  const TypeSummaryOptions &options); // libc++ std::function<>
49 
50 SyntheticChildrenFrontEnd *
51 LibcxxVectorBoolSyntheticFrontEndCreator(CXXSyntheticChildren *,
52  lldb::ValueObjectSP);
53 
54 bool LibcxxContainerSummaryProvider(ValueObject &valobj, Stream &stream,
55  const TypeSummaryOptions &options);
56 
58 public:
59  LibCxxMapIteratorSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp);
60 
61  size_t CalculateNumChildren() override;
62 
63  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override;
64 
65  bool Update() override;
66 
67  bool MightHaveChildren() override;
68 
69  size_t GetIndexOfChildWithName(ConstString name) override;
70 
72 
73 private:
74  ValueObject *m_pair_ptr;
75  lldb::ValueObjectSP m_pair_sp;
76 };
77 
80  lldb::ValueObjectSP);
81 
84  lldb::ValueObjectSP);
85 
87 public:
88  LibcxxSharedPtrSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp);
89 
90  size_t CalculateNumChildren() override;
91 
92  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override;
93 
94  bool Update() override;
95 
96  bool MightHaveChildren() override;
97 
98  size_t GetIndexOfChildWithName(ConstString name) override;
99 
101 
102 private:
103  ValueObject *m_cntrl;
104  lldb::ValueObjectSP m_count_sp;
105  lldb::ValueObjectSP m_weak_count_sp;
106  uint8_t m_ptr_size;
107  lldb::ByteOrder m_byte_order;
108 };
109 
112  lldb::ValueObjectSP);
113 
116  lldb::ValueObjectSP);
117 
120  lldb::ValueObjectSP);
121 
124  lldb::ValueObjectSP);
125 
128  lldb::ValueObjectSP);
129 
132  lldb::ValueObjectSP);
133 
136  lldb::ValueObjectSP);
137 
140  lldb::ValueObjectSP);
141 
143  lldb::ValueObjectSP);
144 
146  lldb::ValueObjectSP);
147 
150  lldb::ValueObjectSP valobj_sp);
151 
154  lldb::ValueObjectSP valobj_sp);
155 
156 } // namespace formatters
157 } // namespace lldb_private
158 
159 #endif // liblldb_LibCxx_h_
SyntheticChildrenFrontEnd * LibCxxVectorIteratorSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxx.cpp:333
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
bool LibcxxStringSummaryProviderUTF16(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:668
bool LibcxxWStringSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:546
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
Definition: LibCxx.cpp:287
bool LibcxxStringSummaryProviderUTF32(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:675
bool LibcxxOptionalSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:34
SyntheticChildrenFrontEnd * LibCxxMapIteratorSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxx.cpp:317
SyntheticChildrenFrontEnd * LibcxxStdForwardListSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxList.cpp:441
SyntheticChildrenFrontEnd * LibcxxVectorBoolSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
SyntheticChildrenFrontEnd * LibcxxTupleFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxTuple.cpp:77
bool LibcxxContainerSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:452
SyntheticChildrenFrontEnd * LibcxxStdVectorSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
bool LibcxxStringSummaryProviderASCII(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:661
SyntheticChildrenFrontEnd * LibcxxStdMapSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxMap.cpp:460
SyntheticChildrenFrontEnd * LibcxxSharedPtrSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxx.cpp:446
size_t GetIndexOfChildWithName(ConstString name) override
Definition: LibCxx.cpp:302
SyntheticChildrenFrontEnd * LibcxxStdListSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxList.cpp:435
SyntheticChildrenFrontEnd * LibcxxOptionalFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP valobj_sp)
SyntheticChildrenFrontEnd * LibcxxStdUnorderedMapSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
A uniqued constant string class.
Definition: ConstString.h:38
bool LibcxxFunctionSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:56
LibCxxMapIteratorSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition: LibCxx.cpp:170
SyntheticChildrenFrontEnd * LibcxxVariantFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP valobj_sp)
SyntheticChildrenFrontEnd * LibcxxQueueFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxxQueue.cpp:55
SyntheticChildrenFrontEnd * LibcxxInitializerListSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
bool LibcxxSmartPointerSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:104
SyntheticChildrenFrontEnd * LibcxxBitsetSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)