[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 26 11:27:20 PDT 2024


================
@@ -46,8 +48,79 @@ SaveCoreOptions::GetOutputFile() const {
   return m_file;
 }
 
+Status SaveCoreOptions::SetProcess(lldb::ProcessSP process_sp) {
+  Status error;
+  if (!process_sp) {
+    ClearProcessSpecificData();
+    m_process_sp = nullptr;
+    return error;
+  }
+
+  if (!process_sp->IsValid()) {
+    error.SetErrorString("Cannot assign an invalid process.");
+    return error;
+  }
+
+  if (m_process_sp)
+    ClearProcessSpecificData();
----------------
clayborg wrote:

You already checked `m_process_sp` above, this can just be:
```
ClearProcessSpecificData();
```

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


More information about the lldb-commits mailing list