[Lldb-commits] [lldb] [lldb] Speed up FindInMemory tests (PR #111951)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 11 12:01:00 PDT 2024
================
@@ -6,27 +6,30 @@
UNALIGNED_INSTANCE_PATTERN_HEAP = ALIGNED_INSTANCE_PATTERN_HEAP[1:]
-def GetAlignedRange(test_base):
+def GetAlignedRange(test_base, shrink=False):
frame = test_base.thread.GetSelectedFrame()
ex = frame.EvaluateExpression("aligned_string_ptr")
test_base.assertTrue(ex.IsValid())
- return GetRangeFromAddrValue(test_base, ex)
+ return GetRangeFromAddrValue(test_base, ex, shrink)
-def GetStackRange(test_base):
+def GetStackRange(test_base, shrink=False):
frame = test_base.thread.GetSelectedFrame()
ex = frame.EvaluateExpression("&stack_pointer")
test_base.assertTrue(ex.IsValid())
- return GetRangeFromAddrValue(test_base, ex)
+ return GetRangeFromAddrValue(test_base, ex, shrink)
-def GetStackRanges(test_base):
+def GetStackRanges(test_base, shrink=False):
addr_ranges = lldb.SBAddressRangeList()
addr_ranges.Append(GetStackRange(test_base))
return addr_ranges
-def GetRangeFromAddrValue(test_base, addr):
+def GetRangeFromAddrValue(test_base, addr, shrink=False):
----------------
bulbazord wrote:
Since these are only used for testing, why not remove the `shrink` parameter and always keep the memory region below 2K?
https://github.com/llvm/llvm-project/pull/111951
More information about the lldb-commits
mailing list