[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add 64b support to LLDB's minidump file builder. (PR #95312)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 13 14:15:15 PDT 2024


================
@@ -858,10 +923,224 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const {
   return error;
 }
 
-size_t MinidumpFileBuilder::GetDirectoriesNum() const {
-  return m_directories.size();
+Status MinidumpFileBuilder::AddMemoryList_32(
+    const Process::CoreFileMemoryRanges &ranges) {
+  std::vector<MemoryDescriptor> descriptors;
+  Status error;
+  Log *log = GetLog(LLDBLog::Object);
+  size_t region_index = 0;
----------------
clayborg wrote:

Make on DataBufferHeap outside of this loop and re-use it:
```
lldb::offset_t max_size = 0;
for (const auto &core_range : ranges) {
  if (core_range.renge.size() > max_size)
    max_size = core_range.renge.size();
}
auto data_up = std::make_unique<DataBufferHeap>(max_size, 0);
```

auto data_up = std::make_unique<DataBufferHeap>(size, 0);

https://github.com/llvm/llvm-project/pull/95312


More information about the lldb-commits mailing list