LLDB mainline
SBTypeSummary.h
Go to the documentation of this file.
1//===-- SBTypeSummary.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_API_SBTYPESUMMARY_H
11#define LLDB_API_SBTYPESUMMARY_H
12
13#include "lldb/API/SBDefines.h"
14
15namespace lldb_private {
16namespace python {
17class SWIGBridge;
18}
19} // namespace lldb_private
20
21namespace lldb {
23public:
25
27
28
30
31 explicit operator bool() const;
32
33 bool IsValid();
34
35 lldb::LanguageType GetLanguage();
36
37 lldb::TypeSummaryCapping GetCapping();
38
39 void SetLanguage(lldb::LanguageType);
40
41 void SetCapping(lldb::TypeSummaryCapping);
42
43protected:
44 friend class SBValue;
45 friend class SBTypeSummary;
46
47 friend class lldb_private::python::SWIGBridge;
48
50
52
53 const lldb_private::TypeSummaryOptions *operator->() const;
54
56
58
59 const lldb_private::TypeSummaryOptions &ref() const;
60
61private:
62 std::unique_ptr<lldb_private::TypeSummaryOptions> m_opaque_up;
63};
64
66public:
68
69 // Native function summary formatter callback
71
72 static SBTypeSummary
73 CreateWithSummaryString(const char *data,
74 uint32_t options = 0); // see lldb::eTypeOption values
75
76 static SBTypeSummary
77 CreateWithFunctionName(const char *data,
78 uint32_t options = 0); // see lldb::eTypeOption values
79
80 static SBTypeSummary
81 CreateWithScriptCode(const char *data,
82 uint32_t options = 0); // see lldb::eTypeOption values
83
84#ifndef SWIG
86 uint32_t options = 0,
87 const char *description = nullptr);
88#endif
89
91
93
94 explicit operator bool() const;
95
96 bool IsValid() const;
97
98 bool IsFunctionCode();
99
100 bool IsFunctionName();
101
102 bool IsSummaryString();
103
104 const char *GetData();
105
106 void SetSummaryString(const char *data);
107
108 void SetFunctionName(const char *data);
109
110 void SetFunctionCode(const char *data);
111
112 uint32_t GetOptions();
113
114 void SetOptions(uint32_t);
115
116 bool GetDescription(lldb::SBStream &description,
117 lldb::DescriptionLevel description_level);
118
120
121 bool DoesPrintValue(lldb::SBValue value);
122
124
126
128
129protected:
130 friend class SBDebugger;
131 friend class SBTypeCategory;
132 friend class SBValue;
133
135
136 void SetSP(const lldb::TypeSummaryImplSP &typefilter_impl_sp);
137
139
141
142 bool CopyOnWrite_Impl();
143
144 bool ChangeSummaryType(bool want_script);
145};
146
147} // namespace lldb
148
149#endif // LLDB_API_SBTYPESUMMARY_H
#define LLDB_API
Definition: SBDefines.h:28
std::unique_ptr< lldb_private::TypeSummaryOptions > m_opaque_up
Definition: SBTypeSummary.h:62
static SBTypeSummary CreateWithFunctionName(const char *data, uint32_t options=0)
void SetSummaryString(const char *data)
void SetOptions(uint32_t)
lldb::SBTypeSummary & operator=(const lldb::SBTypeSummary &rhs)
static SBTypeSummary CreateWithCallback(FormatCallback cb, uint32_t options=0, const char *description=nullptr)
static SBTypeSummary CreateWithSummaryString(const char *data, uint32_t options=0)
bool operator==(lldb::SBTypeSummary &rhs)
bool ChangeSummaryType(bool want_script)
friend class SBValue
void SetSP(const lldb::TypeSummaryImplSP &typefilter_impl_sp)
bool(* FormatCallback)(SBValue, SBTypeSummaryOptions, SBStream &)
Definition: SBTypeSummary.h:70
void SetFunctionCode(const char *data)
static SBTypeSummary CreateWithScriptCode(const char *data, uint32_t options=0)
bool operator!=(lldb::SBTypeSummary &rhs)
bool IsEqualTo(lldb::SBTypeSummary &rhs)
lldb::TypeSummaryImplSP m_opaque_sp
const char * GetData()
bool DoesPrintValue(lldb::SBValue value)
void SetFunctionName(const char *data)
bool GetDescription(lldb::SBStream &description, lldb::DescriptionLevel description_level)
lldb::TypeSummaryImplSP GetSP()
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
Definition: SBAddress.h:15
TypeSummaryCapping
Whether a summary should cap how much data it returns to users or not.
std::shared_ptr< lldb_private::TypeSummaryImpl > TypeSummaryImplSP
Definition: lldb-forward.h:463
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
LanguageType
Programming language type.