This repository was archived by the owner on May 21, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +18
-0
lines changed
packages/Python/lldbsuite/test/python_api/formatters Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -286,6 +286,9 @@ class LLDB_API SBDebugger
286
286
SBTypeCategory
287
287
GetCategory (const char * category_name);
288
288
289
+ SBTypeCategory
290
+ GetCategory (lldb::LanguageType lang_type);
291
+
289
292
SBTypeCategory
290
293
CreateCategory (const char * category_name);
291
294
Original file line number Diff line number Diff line change @@ -290,6 +290,8 @@ def cleanup():
290
290
self .expect ("frame variable e1" , substrs = ["I am an empty Empty1 {}" ])
291
291
self .expect ("frame variable e2" , substrs = ["I am an empty Empty2" ])
292
292
self .expect ("frame variable e2" , substrs = ["I am an empty Empty2 {}" ], matching = False )
293
+
294
+ self .assertTrue (self .dbg .GetCategory (lldb .eLanguageTypeObjC ) is not None , "ObjC category is None" )
293
295
294
296
@add_test_categories (['pyapi' ])
295
297
def test_force_synth_off (self ):
Original file line number Diff line number Diff line change @@ -343,6 +343,9 @@ public:
343
343
lldb::SBTypeCategory
344
344
GetCategory (const char * category_name);
345
345
346
+ SBTypeCategory
347
+ GetCategory (lldb::LanguageType lang_type);
348
+
346
349
lldb::SBTypeCategory
347
350
CreateCategory (const char * category_name);
348
351
Original file line number Diff line number Diff line change @@ -1268,6 +1268,16 @@ SBDebugger::GetCategory (const char* category_name)
1268
1268
return SBTypeCategory ();
1269
1269
}
1270
1270
1271
+ SBTypeCategory
1272
+ SBDebugger::GetCategory (lldb::LanguageType lang_type)
1273
+ {
1274
+ TypeCategoryImplSP category_sp;
1275
+ if (DataVisualization::Categories::GetCategory (lang_type, category_sp))
1276
+ return SBTypeCategory (category_sp);
1277
+ else
1278
+ return SBTypeCategory ();
1279
+ }
1280
+
1271
1281
SBTypeCategory
1272
1282
SBDebugger::CreateCategory (const char * category_name)
1273
1283
{
You can’t perform that action at this time.
0 commit comments