[Lldb-commits] [lldb] [lldb] End to end test for address spaces using lldb-server mock accelerator plugin (PR #217092)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 2 14:46:28 PDT 2026


================
@@ -0,0 +1,85 @@
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import configuration
+
+
+class MockAcceleratorAddressSpacesTestCase(TestBase):
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        super().setUp()
+        if "mock-accelerator" not in configuration.enabled_plugins:
+            self.skipTest("mock-accelerator plugin is not enabled")
+
+    def accelerator_target(self, native_target):
+        for i in range(self.dbg.GetNumTargets()):
+            candidate = self.dbg.GetTargetAtIndex(i)
+            if candidate != native_target:
----------------
jasonmolenda wrote:

I don't know if this operator== does what we think it does in python.  If the comparison is comparing Python SBTarget objects, there could be multiple SBTargets that refer to the same Target object through their TargetSP pointer in internal storage, right.

https://github.com/llvm/llvm-project/pull/217092


More information about the lldb-commits mailing list