================
@@ -31,21 +37,20 @@ def GetRangeFromAddrValue(test_base, addr, shrink=False):
     If 'shrink' is True, the address range will be reduced to not exceed 2K.
     """
     region = lldb.SBMemoryRegionInfo()
+    addr_val = strip_tbi(addr.GetValueAsUnsigned())
     test_base.assertTrue(
-        test_base.process.GetMemoryRegionInfo(
-            addr.GetValueAsUnsigned(), region
-        ).Success(),
+        test_base.process.GetMemoryRegionInfo(addr_val, region).Success(),
     )
 
     test_base.assertTrue(region.IsReadable())
     test_base.assertFalse(region.IsExecutable())
 
-    base = region.GetRegionBase()
-    end = region.GetRegionEnd()
+    base = strip_tbi(region.GetRegionBase())
+    end = strip_tbi(region.GetRegionEnd())
----------------
DavidSpickett wrote:

I don't think we have ever said that non-address bits must not be set for a 
region address. The information comes from 
https://lldb.llvm.org/resources/lldbgdbremote.html#qmemoryregioninfo-addr.

Though in practice, Linux's regions will never have non-address bits set.

I'd be interested to know if stripping here is just because in theory the tag 
byte could be set, or because it actually is on these systems. Even if it's the 
former, there's a good argument to apply it to all addresses for consistency 
anyway.

https://github.com/llvm/llvm-project/pull/185802
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to