[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:48:14 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:
ok, seems to behave as we'd hope
```
(lldb) tar li
Current targets:
target #0: /tmp/a.out ( arch=arm64-apple-macosx27.0.0, platform=host )
* target #1: /Volumes/home/jason/k/llvm/llvm-project/build/bin/lldb ( arch=arm64-apple-macosx26.0.0, platform=host )
(lldb) scri
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
>>> t1 = lldb.debugger.GetTargetAtIndex(0)
>>> t2 = lldb.debugger.GetTargetAtIndex(0)
>>> t3 = lldb.debugger.GetTargetAtIndex(1)
>>> t1==t2
True
>>> t1==t3
False
```
https://github.com/llvm/llvm-project/pull/217092
More information about the lldb-commits
mailing list