[lldb-dev] Handling core files > 4GB

Samuel Jacob samueldotj at gmail.com
Wed Apr 17 10:33:47 PDT 2013


In found a bug in ELFCore plugin when dealing with a large
corefile(>4GB) because of integer overflow. I believe the bug exists
in MachCore plugin also. Here is a fix which works for me. Change
addr_t to uint64_t if desired.

Index: source/Plugins/Process/mach-core/ProcessMachCore.h
===================================================================
--- source/Plugins/Process/mach-core/ProcessMachCore.h  (revision 179664)
+++ source/Plugins/Process/mach-core/ProcessMachCore.h  (working copy)
@@ -129,7 +129,7 @@
     //------------------------------------------------------------------
     // For ProcessMachCore only
     //------------------------------------------------------------------
-    typedef lldb_private::Range<uint32_t, uint32_t> FileRange;
+    typedef lldb_private::Range<addr_t, addr_t> FileRange;
     typedef lldb_private::RangeDataVector<lldb::addr_t, lldb::addr_t,
FileRange> VMRangeToFileOffset;

     VMRangeToFileOffset m_core_aranges;



More information about the lldb-dev mailing list