[Lldb-commits] [lldb] Add new API in SBTarget for loading core from SBFile (PR #71769)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 9 09:37:36 PST 2023
================
@@ -49,17 +50,18 @@ void ProcessElfCore::Terminate() {
lldb::ProcessSP ProcessElfCore::CreateInstance(lldb::TargetSP target_sp,
lldb::ListenerSP listener_sp,
- const FileSpec *crash_file,
+ lldb::FileSP crash_file_sp,
bool can_connect) {
lldb::ProcessSP process_sp;
- if (crash_file && !can_connect) {
+ if (crash_file_sp && !can_connect) {
// Read enough data for an ELF32 header or ELF64 header Note: Here we care
// about e_type field only, so it is safe to ignore possible presence of
// the header extension.
const size_t header_size = sizeof(llvm::ELF::Elf64_Ehdr);
-
- auto data_sp = FileSystem::Instance().CreateDataBuffer(
- crash_file->GetPath(), header_size, 0);
+ const FileSpec file_spec;
+ crash_file_sp->GetFileSpec(const_cast<FileSpec &>(file_spec));
----------------
bulbazord wrote:
Here too
https://github.com/llvm/llvm-project/pull/71769
More information about the lldb-commits
mailing list