[Lldb-commits] [PATCH] D88483: Add possibility to get module from SBType
Ilya Bukonkin via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 29 15:09:27 PDT 2020
fallkrum updated this revision to Diff 301768.
fallkrum added a comment.
Api test improvements.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88483/new/
https://reviews.llvm.org/D88483
Files:
lldb/test/API/functionalities/type_get_module/TestTypeGetModule.py
Index: lldb/test/API/functionalities/type_get_module/TestTypeGetModule.py
===================================================================
--- lldb/test/API/functionalities/type_get_module/TestTypeGetModule.py
+++ lldb/test/API/functionalities/type_get_module/TestTypeGetModule.py
@@ -25,11 +25,25 @@
self.assertEqual(num_comp_units, 3)
comp_unit = exe_module.GetCompileUnitAtIndex(1)
- type_name = comp_unit.GetTypes().GetTypeAtIndex(0).GetName()
+ self.assertTrue(comp_unit.IsValid())
+
+ type = comp_unit.GetTypes().GetTypeAtIndex(0)
+ self.assertTrue(type.IsValid())
+
+ type_name = type.GetName()
+ if self.TraceOn():
+ print(type_name)
self.assertEqual(type_name, type1_name)
comp_unit = exe_module.GetCompileUnitAtIndex(2)
- type_name = comp_unit.GetTypes().GetTypeAtIndex(0).GetName()
+ self.assertTrue(comp_unit.IsValid())
+
+ type = comp_unit.GetTypes().GetTypeAtIndex(0)
+ self.assertTrue(type.IsValid())
+
+ type_name = type.GetName()
+ if self.TraceOn():
+ print(type_name)
self.assertEqual(type_name, type2_name)
type1 = target.FindFirstType(type1_name)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88483.301768.patch
Type: text/x-patch
Size: 1293 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201029/711c3b37/attachment.bin>
More information about the lldb-commits
mailing list