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

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 5 16:16:53 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,
----------------
clayborg wrote:

move to SBTarget for consistency at the public API layer since we load the core file in SBTarget. If others believe that this should stay in SBProcess, let me know as I can go with what makes most sense, but the target seems the right location as I am thinking about it right now.

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


More information about the lldb-commits mailing list