[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Make workaround for the Dynamic loader issue (PR #120166)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 7 02:40:34 PST 2025
================
@@ -89,8 +89,11 @@ Status MinidumpFileBuilder::AddHeaderAndCalculateDirectories() {
"Failed to fill in header and directory "
"sections. Written / Expected (%" PRIx64 " / %" PRIx64 ")",
new_offset, m_saved_data_size);
-
return error;
+ if (error.Fail())
+ return error;
----------------
labath wrote:
Ultimately I think this patch is a workaround for the fact that the dynamic loader (posix) and process (minidump) classes can't agree on how to load the modules. The dynamic loader expect that it will be completely in charge of module loading, and this works fine in case of a live process, as it always contains enough information to determine the set of loaded modules. A minidump does not (always) contains this information, but (maybe for that same reason) it contains a explicit list of loaded modules (which is handled by the process class). When we start to use both sources, things get messy. I'm not sure what's the best way to handle this situation, but I think this patch approximates the desired behavior relatively well, and I think it is useful to be able to tell who generated a minidump.
https://github.com/llvm/llvm-project/pull/120166
More information about the lldb-commits
mailing list