[Lldb-commits] [lldb] [lldb][API] Add Find(Ranges)InMemory() to Process SB API (PR #95007)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 10 14:04:35 PDT 2024


================
@@ -0,0 +1,31 @@
+import lldb
+
+SINGLE_INSTANCE_PATTERN = "there_is_only_one_of_me"
+DOUBLE_INSTANCE_PATTERN = "there_is_exactly_two_of_me"
+
+
+def GetAddressRanges(test_base):
----------------
clayborg wrote:

Here you can just get the current thread's stack pointer for "there_is_only_one_of_me" and then get its region, and using the SBValue for "str1" and "str2" (see changes to the test program below), you can extract the pointer to the heap copy, and then use that address region.

https://github.com/llvm/llvm-project/pull/95007


More information about the lldb-commits mailing list