[Lldb-commits] [lldb] [LLDB] Fix Memory64 BaseRVA, move all non-stack memory to Mem64. (PR #146777)

David Peixotto via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 16 12:16:10 PDT 2025


================
@@ -964,6 +964,18 @@ Status PluginManager::SaveCore(const lldb::ProcessSP &process_sp,
     return error;
   }
 
+  // Set the process sp if not already set.
+  ProcessSP options_sp = options.GetProcess();
----------------
dmpots wrote:

The name `options_sp` is a bit confusing to me because it is not a shared_ptr to Options but a shared_ptr to a Process.

I think we could actually just get rid of this variable and then it would simplify the check below because we can always validate that the process matches.

```
  if (!options.GetProcess())
    options.SetProcess(process_sp);

  // Make sure the process sp is the same as the one we are using.
  if (options.GetProcess() != process_sp) {
    ...
  }
```


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


More information about the lldb-commits mailing list