[Lldb-commits] [lldb] 9dcb429 - [lldb][test] Skip the sp/rsp check in register sets that have no rsp (#226176)

via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 25 10:53:03 PDT 2026


Author: Charles Zablit
Date: 2026-09-25T18:52:49+01:00
New Revision: 9dcb4291cea195b9f0941d39540a4f2ccb9ff6bd

URL: https://github.com/llvm/llvm-project/commit/9dcb4291cea195b9f0941d39540a4f2ccb9ff6bd
DIFF: https://github.com/llvm/llvm-project/commit/9dcb4291cea195b9f0941d39540a4f2ccb9ff6bd.diff

LOG: [lldb][test] Skip the sp/rsp check in register sets that have no rsp (#226176)

The test asserts the ABI name `"sp"` resolves to `"rsp"` within the same
register set. However, on Windows the architectural 16-bit `"sp"` lives
in `"supplementary registers"` while `"rsp"` is in `"General Purpose
Registers"`, so there is nothing to compare against.


https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/x64-architecture

This fixes `python_api/value/TestValueAPI.py` (`test_register`) on
Windows in swiftlang.

Added: 
    

Modified: 
    lldb/test/API/python_api/value/TestValueAPI.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/python_api/value/TestValueAPI.py b/lldb/test/API/python_api/value/TestValueAPI.py
index ddbda2d0efd20..d42dcbf79b6ff 100644
--- a/lldb/test/API/python_api/value/TestValueAPI.py
+++ b/lldb/test/API/python_api/value/TestValueAPI.py
@@ -311,6 +311,13 @@ def test_register(self):
                     # the ABI name "sp", which LLDB resolves to "rsp", not to the
                     # architectural register "sp".
                     # See https://github.com/llvm/llvm-project/issues/212778.
+                    #
+                    # Some targets expose the architectural "sp" in a 
diff erent
+                    # set than "rsp" (on Windows, "supplementary registers"),
+                    # leaving nothing to compare against here.
+                    if not reg_set.GetChildMemberWithName("rsp").IsValid():
+                        continue
+
                     sp_with_name_index = reg_set.GetIndexOfChildWithName(reg_name)
                     self.assertTrue(sp_with_name_index < num_registers)
                     rsp_with_name_index = reg_set.GetIndexOfChildWithName("rsp")


        


More information about the lldb-commits mailing list