1 //===-- Cocoa.h ---------------------------------------------------*- C++
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
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_SOURCE_PLUGINS_LANGUAGE_OBJC_COCOA_H
11 #define LLDB_SOURCE_PLUGINS_LANGUAGE_OBJC_COCOA_H
13 #include "lldb/DataFormatters/TypeSummary.h"
14 #include "lldb/DataFormatters/TypeSynthetic.h"
15 #include "lldb/Utility/Stream.h"
16 #include "lldb/ValueObject/ValueObject.h"
18 #include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
20 namespace lldb_private
{
21 namespace formatters
{
22 bool NSIndexSetSummaryProvider(ValueObject
&valobj
, Stream
&stream
,
23 const TypeSummaryOptions
&options
);
25 bool NSArraySummaryProvider(ValueObject
&valobj
, Stream
&stream
,
26 const TypeSummaryOptions
&options
);
28 template <bool needs_at
>
29 bool NSDataSummaryProvider(ValueObject
&valobj
, Stream
&stream
,
30 const TypeSummaryOptions
&options
);
32 bool NSNumberSummaryProvider(ValueObject
&valobj
, Stream
&stream
,
33 const TypeSummaryOptions
&options
);
35 bool NSDecimalNumberSummaryProvider(ValueObject
&valobj
, Stream
&stream
,
36 const TypeSummaryOptions
&options
);
38 bool NSNotificationSummaryProvider(ValueObject
&valobj
, Stream
&stream
,
39 const TypeSummaryOptions
&options
);
41 bool NSTimeZoneSummaryProvider(ValueObject
&valobj
, Stream
&stream
,
42 const TypeSummaryOptions
&options
);
44 bool NSMachPortSummaryProvider(ValueObject
&valobj
, Stream
&stream
,
45 const TypeSummaryOptions
&options
);
47 bool NSDateSummaryProvider(ValueObject
&valobj
, Stream
&stream
,
48 const TypeSummaryOptions
&options
);
50 bool NSBundleSummaryProvider(ValueObject
&valobj
, Stream
&stream
,
51 const TypeSummaryOptions
&options
);
53 bool NSURLSummaryProvider(ValueObject
&valobj
, Stream
&stream
,
54 const TypeSummaryOptions
&options
);
56 extern template bool NSDataSummaryProvider
<true>(ValueObject
&, Stream
&,
57 const TypeSummaryOptions
&);
59 extern template bool NSDataSummaryProvider
<false>(ValueObject
&, Stream
&,
60 const TypeSummaryOptions
&);
62 SyntheticChildrenFrontEnd
*
63 NSArraySyntheticFrontEndCreator(CXXSyntheticChildren
*, lldb::ValueObjectSP
);
65 SyntheticChildrenFrontEnd
*
66 NSIndexPathSyntheticFrontEndCreator(CXXSyntheticChildren
*,
69 bool ObjCClassSummaryProvider(ValueObject
&valobj
, Stream
&stream
,
70 const TypeSummaryOptions
&options
);
72 SyntheticChildrenFrontEnd
*
73 ObjCClassSyntheticFrontEndCreator(CXXSyntheticChildren
*, lldb::ValueObjectSP
);
75 bool ObjCBOOLSummaryProvider(ValueObject
&valobj
, Stream
&stream
,
76 const TypeSummaryOptions
&options
);
78 bool ObjCBooleanSummaryProvider(ValueObject
&valobj
, Stream
&stream
,
79 const TypeSummaryOptions
&options
);
81 template <bool is_sel_ptr
>
82 bool ObjCSELSummaryProvider(ValueObject
&valobj
, Stream
&stream
,
83 const TypeSummaryOptions
&options
);
85 extern template bool ObjCSELSummaryProvider
<true>(ValueObject
&, Stream
&,
86 const TypeSummaryOptions
&);
88 extern template bool ObjCSELSummaryProvider
<false>(ValueObject
&, Stream
&,
89 const TypeSummaryOptions
&);
91 bool NSError_SummaryProvider(ValueObject
&valobj
, Stream
&stream
,
92 const TypeSummaryOptions
&options
);
94 bool NSException_SummaryProvider(ValueObject
&valobj
, Stream
&stream
,
95 const TypeSummaryOptions
&options
);
97 SyntheticChildrenFrontEnd
*
98 NSErrorSyntheticFrontEndCreator(CXXSyntheticChildren
*,
99 lldb::ValueObjectSP valobj_sp
);
101 SyntheticChildrenFrontEnd
*
102 NSExceptionSyntheticFrontEndCreator(CXXSyntheticChildren
*,
103 lldb::ValueObjectSP valobj_sp
);
105 class NSArray_Additionals
{
107 static std::map
<ConstString
, CXXFunctionSummaryFormat::Callback
> &
108 GetAdditionalSummaries();
110 static std::map
<ConstString
, CXXSyntheticChildren::CreateFrontEndCallback
> &
111 GetAdditionalSynthetics();
113 } // namespace formatters
114 } // namespace lldb_private
116 #endif // LLDB_SOURCE_PLUGINS_LANGUAGE_OBJC_COCOA_H