diff options
author | Greg Clayton <gclayton@apple.com> | 2013-02-06 17:22:03 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-02-06 17:22:03 +0000 |
commit | 5ce9c5657cb77c0f1919be0aa3c990009a7bc60b (patch) | |
tree | aca6aa117e81783b21300ba0ff86b126ef7035e6 /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h | |
parent | 0e1cf09c89343dbbe14490c550ab1fc74b642003 (diff) | |
download | bcm5719-llvm-5ce9c5657cb77c0f1919be0aa3c990009a7bc60b.tar.gz bcm5719-llvm-5ce9c5657cb77c0f1919be0aa3c990009a7bc60b.zip |
<rdar://problem/13159777>
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
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h')
-rw-r--r-- | lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h | 14 |
1 files changed, 8 insertions, 6 deletions
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<elf::ELFProgramHeader> ProgramHeaderColl; typedef ProgramHeaderColl::iterator ProgramHeaderCollIter; |