From 5ce9c5657cb77c0f1919be0aa3c990009a7bc60b Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Wed, 6 Feb 2013 17:22:03 +0000 Subject: lldb was mmap'ing archive files once per .o file it loads, now it correctly shares the archive between modules. LLDB was also always mapping entire contents of universal mach-o files, now it maps just the slice that is required. Added a new logging channel for "lldb" called "mmap" to help track future regressions. Modified the ObjectFile and ObjectContainer plugin interfaces to take a data offset along with the file offset and size so we can implement the correct caching and efficient reading of parts of files without mmap'ing the entire file like we used to. The current implementation still keeps entire .a files mmaped (once) and entire slices from universal files mmaped to ensure that if a client builds their binaries during a debug session we don't lose our data and get corrupt object file info and debug info. llvm-svn: 174524 --- lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h') diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h index f347c7b3118..2c1ff6c4d38 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h @@ -46,10 +46,11 @@ public: static lldb_private::ObjectFile * CreateInstance(const lldb::ModuleSP &module_sp, - lldb::DataBufferSP& dataSP, + lldb::DataBufferSP& data_sp, + lldb::offset_t data_offset, const lldb_private::FileSpec* file, - lldb::addr_t offset, - lldb::addr_t length); + lldb::offset_t file_offset, + lldb::offset_t length); static lldb_private::ObjectFile * CreateMemoryInstance (const lldb::ModuleSP &module_sp, @@ -119,10 +120,11 @@ public: private: ObjectFileELF(const lldb::ModuleSP &module_sp, - lldb::DataBufferSP& dataSP, + lldb::DataBufferSP& data_sp, + lldb::offset_t data_offset, const lldb_private::FileSpec* file, - lldb::addr_t offset, - lldb::addr_t length); + lldb::offset_t offset, + lldb::offset_t length); typedef std::vector ProgramHeaderColl; typedef ProgramHeaderColl::iterator ProgramHeaderCollIter; -- cgit v1.2.3