[Lldb-commits] [lldb] [lldb] Support arm64e in TestClearSBValueNonAddressableBits.py (PR #194748)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Tue Apr 28 16:11:10 PDT 2026
https://github.com/bulbazord created https://github.com/llvm/llvm-project/pull/194748
These values are expected to be different on arm64e where the raw pointer value should have all the tagged bits and the stripped pointer shouldn't.
>From 8667f9bd4a14e01fb59a3c284de005d71a1268e5 Mon Sep 17 00:00:00 2001
From: Alex Langford <alangford at apple.com>
Date: Tue, 28 Apr 2026 16:09:28 -0700
Subject: [PATCH] [lldb] Support arm64e in
TestClearSBValueNonAddressableBits.py
These values are expected to be different on arm64e where the raw
pointer value should have all the tagged bits and the stripped pointer
shouldn't.
---
.../TestClearSBValueNonAddressableBits.py | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/lldb/test/API/clear-sbvalue-nonaddressable-bits/TestClearSBValueNonAddressableBits.py b/lldb/test/API/clear-sbvalue-nonaddressable-bits/TestClearSBValueNonAddressableBits.py
index 382b0e7a81d23..67f1b62d2a49b 100644
--- a/lldb/test/API/clear-sbvalue-nonaddressable-bits/TestClearSBValueNonAddressableBits.py
+++ b/lldb/test/API/clear-sbvalue-nonaddressable-bits/TestClearSBValueNonAddressableBits.py
@@ -54,6 +54,14 @@ def test(self):
main_p = frame.FindVariable("main_p")
main_invalid_p = frame.FindVariable("main_invalid_p")
- self.assertEqual(
- main_p.GetValueAsUnsigned(), main_invalid_p.GetValueAsAddress()
- )
+ if self.getArchitecture() in ["arm64e"]:
+ # On arm64e, main_p.GetValueAsUnsigned() will have all the pointer
+ # metadata in it whereas main_invalid_p will have all the metadata
+ # stripped.
+ self.assertNotEqual(
+ main_p.GetValueAsUnsigned(), main_invalid_p.GetValueAsAddress()
+ )
+ else:
+ self.assertEqual(
+ main_p.GetValueAsUnsigned(), main_invalid_p.GetValueAsAddress()
+ )
More information about the lldb-commits
mailing list