================
@@ -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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to