[Lldb-commits] [lldb] [lldb] Add a MemoryRegionInfo cache at a process stop (PR #202509)

Felipe de Azevedo Piovezan via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 9 00:48:59 PDT 2026


================
@@ -3024,6 +3024,31 @@ rnb_err_t RNBRemote::SendStopReplyPacketForThread(nub_thread_t tid) {
       }
     }
 
+    DNBRegisterValue sp_regval;
+    if (DNBThreadGetRegisterValueByID(pid, tid, REGISTER_SET_GENERIC,
+                                      GENERIC_REGNUM_SP, &sp_regval)) {
+      uint64_t sp = INVALID_NUB_ADDRESS;
+      if (sp_regval.value.uint64 != INVALID_NUB_ADDRESS) {
+        if (sp_regval.info.size == 4)
+          sp = sp_regval.value.uint32;
+        else if (sp_regval.info.size == 8)
+          sp = sp_regval.value.uint64;
+        if (sp != INVALID_NUB_ADDRESS) {
+          if (JSONGenerator::ObjectSP obj_sp =
+                  DNBProcessMemoryRegionInfo(pid, sp)) {
+            JSONGenerator::ArraySP containing_arr_sp =
----------------
felipepiovezan wrote:

Why is this a shared pointer, and not simply a `JSONGenerator::Array`?

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


More information about the lldb-commits mailing list