[Lldb-commits] [PATCH] D132973: [lldb] Fix two bugs in ObjectContainerMachOFileset when reading from memory

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 30 13:48:28 PDT 2022


JDevlieghere created this revision.
JDevlieghere added a reviewer: jasonmolenda.
Herald added a reviewer: ributzka.
Herald added a project: All.
JDevlieghere requested review of this revision.

Jason caught two issues in the memory part of ObjectContainerMachOFileset which I didn't hook up and therefore wasn't able to test.


https://reviews.llvm.org/D132973

Files:
  lldb/source/Plugins/ObjectContainer/Mach-O-Fileset/ObjectContainerMachOFileset.cpp


Index: lldb/source/Plugins/ObjectContainer/Mach-O-Fileset/ObjectContainerMachOFileset.cpp
===================================================================
--- lldb/source/Plugins/ObjectContainer/Mach-O-Fileset/ObjectContainerMachOFileset.cpp
+++ lldb/source/Plugins/ObjectContainer/Mach-O-Fileset/ObjectContainerMachOFileset.cpp
@@ -42,8 +42,9 @@
 ObjectContainerMachOFileset::ObjectContainerMachOFileset(
     const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP data_sp,
     const lldb::ProcessSP &process_sp, lldb::addr_t header_addr)
-    : ObjectContainer(module_sp, nullptr, 0, 0, data_sp, 0),
-      m_memory_addr(header_addr) {}
+    : ObjectContainer(module_sp, nullptr, 0, data_sp->GetByteSize(), data_sp,
+                      0),
+      m_process_wp(process_sp), m_memory_addr(header_addr) {}
 
 ObjectContainer *ObjectContainerMachOFileset::CreateInstance(
     const lldb::ModuleSP &module_sp, DataBufferSP &data_sp,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132973.456788.patch
Type: text/x-patch
Size: 943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220830/a1ff9a24/attachment.bin>


More information about the lldb-commits mailing list