[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 5 16:49:27 PST 2024


================
@@ -1244,6 +1244,17 @@ lldb::SBProcessInfo SBProcess::GetProcessInfo() {
   return sb_proc_info;
 }
 
+lldb::SBFileSpec SBProcess::GetCoreFile() {
+  LLDB_INSTRUMENT_VA(this);
+
+  ProcessSP process_sp(GetSP());
+  FileSpec core_file;
+  if (process_sp) {
+    core_file = process_sp->GetCoreFile();
+  }
+  return SBFileSpec(core_file);
+}
+
 lldb::addr_t SBProcess::AllocateMemory(size_t size, uint32_t permissions,
----------------
jasonmolenda wrote:

My thinking:  this is like asking for the PID of alive process.

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


More information about the lldb-commits mailing list