From 44435ed07a3688b737813ca691c7cf78e086a6c8 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 12 Jan 2012 05:25:17 +0000 Subject: Big change in the way ObjectFile file contents are managed. We now mmap() the entire object file contents into memory with MAP_PRIVATE. We do this because object file contents can change on us and currently this helps alleviate this situation. It also make the code for accessing object file data much easier to manage and we don't end up opening the file, reading some data and closing the file over and over. llvm-svn: 148017 --- lldb/source/Core/Module.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lldb/source/Core/Module.cpp') diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 0b9a05a709a..8dc755b8d14 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -782,7 +782,8 @@ Module::GetObjectFile() m_did_load_objfile = true; Timer scoped_timer(__PRETTY_FUNCTION__, "Module::GetObjectFile () module = %s", GetFileSpec().GetFilename().AsCString("")); - m_objfile_sp = ObjectFile::FindPlugin(this, &m_file, m_object_offset, m_file.GetByteSize()); + DataBufferSP file_data_sp; + m_objfile_sp = ObjectFile::FindPlugin(this, &m_file, m_object_offset, m_file.GetByteSize(), file_data_sp); if (m_objfile_sp) { // Once we get the object file, update our module with the object file's -- cgit v1.2.3