[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:43:57 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:
We pass the filepath to `SBTarget::LoadCore` but I don't think this is a property of the Target, it seems like a property of the Process to me. I suppose someone could create a Process with a core file, then close that Process, then create a new Process with a different core file, all in the same Target if the ArchSpecs were the same.
https://github.com/llvm/llvm-project/pull/80767
More information about the lldb-commits
mailing list