[Lldb-commits] [lldb] [lldb][test] Skip the sp/rsp check in register sets that have no rsp (PR #226176)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 24 07:13:32 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Charles Zablit (charles-zablit)
<details>
<summary>Changes</summary>
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.
This fixes `python_api/value/TestValueAPI.py` (`test_register`) on Windows.
---
Full diff: https://github.com/llvm/llvm-project/pull/226176.diff
1 Files Affected:
- (modified) lldb/test/API/python_api/value/TestValueAPI.py (+7)
``````````diff
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 different
+ # 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")
``````````
</details>
https://github.com/llvm/llvm-project/pull/226176
More information about the lldb-commits
mailing list