================ @@ -797,20 +822,75 @@ void MinidumpFileBuilder::AddLinuxFileStreams( } } -Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const { - constexpr size_t header_size = sizeof(llvm::minidump::Header); - constexpr size_t directory_size = sizeof(llvm::minidump::Directory); +Status MinidumpFileBuilder::AddMemory(const ProcessSP &process_sp, + SaveCoreStyle core_style) { + Status error; + + Process::CoreFileMemoryRanges ranges_for_memory_list; + error = process_sp->CalculateCoreFileSaveRanges( + SaveCoreStyle::eSaveCoreStackOnly, ranges_for_memory_list); + if (error.Fail()) { + return error; + } + + std::set<addr_t> stack_ranges; + for (const auto &core_range : ranges_for_memory_list) { + stack_ranges.insert(core_range.range.start()); + } ---------------- Jlalond wrote:
I would say we should error, especially with the reduced stacks since !92002 if the stacks did exceed 4gb this would be a case where we wouldn't fully be able to support the user. https://github.com/llvm/llvm-project/pull/95312 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits