[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 13 17:49:45 PDT 2024
================
@@ -65,56 +66,52 @@ bool ObjectFileMinidump::SaveCore(const lldb::ProcessSP &process_sp,
if (!process_sp)
return false;
- MinidumpFileBuilder builder;
-
- Target &target = process_sp->GetTarget();
-
- Log *log = GetLog(LLDBLog::Object);
- error = builder.AddSystemInfo(target.GetArchitecture().GetTriple());
- if (error.Fail()) {
- LLDB_LOG(log, "AddSystemInfo failed: %s", error.AsCString());
+ llvm::Expected<lldb::FileUP> maybe_core_file = FileSystem::Instance().Open(
+ outfile, File::eOpenOptionWriteOnly | File::eOpenOptionCanCreate);
+ if (!maybe_core_file) {
+ error = maybe_core_file.takeError();
return false;
}
+ MinidumpFileBuilder builder(std::move(maybe_core_file.get()), process_sp);
- error = builder.AddModuleList(target);
+ Target &target = process_sp->GetTarget();
+ builder.AddHeaderAndCalculateDirectories();
+ Log *log = GetLog(LLDBLog::Object);
+ error = builder.AddSystemInfo();
if (error.Fail()) {
- LLDB_LOG(log, "AddModuleList failed: %s", error.AsCString());
+ LLDB_LOGF(log, "AddSystemInfo failed: %s", error.AsCString());
return false;
}
- builder.AddMiscInfo(process_sp);
+ builder.AddModuleList();
----------------
jeffreytan81 wrote:
Let's handle the failure from `AddModuleList()`. I am pretty sure I have seen a failure once.
https://github.com/llvm/llvm-project/pull/95312
More information about the lldb-commits
mailing list