diff options
author | emaste <emaste@FreeBSD.org> | 2015-07-03 16:57:06 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2015-07-03 16:57:06 +0000 |
commit | 8037fa4ee916fa20b3c63cbf531f4ee7e1c76138 (patch) | |
tree | 3c2e41c3be19b7fc7666ed45a5f91ec3b6e35f2a /source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp | |
parent | d61b076ede88b56f3372a55e7d1eac6a9d717120 (diff) | |
download | FreeBSD-src-8037fa4ee916fa20b3c63cbf531f4ee7e1c76138.zip FreeBSD-src-8037fa4ee916fa20b3c63cbf531f4ee7e1c76138.tar.gz |
Import LLDB as of upstream SVN 241361 (git 612c075f)
Diffstat (limited to 'source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp')
-rw-r--r-- | source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp b/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp index 1e2a0c7..8209d23 100644 --- a/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp +++ b/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp @@ -364,7 +364,7 @@ ObjectContainerBSDArchive::CreateInstance // Map the entire .a file to be sure that we don't lose any data if the file // gets updated by a new build while this .a file is being used for debugging - DataBufferSP archive_data_sp (file->MemoryMapFileContents(file_offset, length)); + DataBufferSP archive_data_sp (file->MemoryMapFileContentsIfLocal(file_offset, length)); lldb::offset_t archive_data_offset = 0; Archive::shared_ptr archive_sp (Archive::FindCachedArchive (*file, @@ -570,7 +570,7 @@ ObjectContainerBSDArchive::GetModuleSpecifications (const lldb_private::FileSpec if (!archive_sp) { set_archive_arch = true; - DataBufferSP data_sp (file.MemoryMapFileContents(file_offset, file_size)); + DataBufferSP data_sp (file.MemoryMapFileContentsIfLocal(file_offset, file_size)); data.SetData (data_sp, 0, data_sp->GetByteSize()); archive_sp = Archive::ParseAndCacheArchiveForFile(file, ArchSpec(), file_mod_time, file_offset, data); } @@ -595,7 +595,8 @@ ObjectContainerBSDArchive::GetModuleSpecifications (const lldb_private::FileSpec TimeValue object_mod_time; object_mod_time.OffsetWithSeconds(object->ar_date); spec.GetObjectName () = object->ar_name; - spec.SetObjectOffset(object_file_offset); + spec.SetObjectOffset (object_file_offset); + spec.SetObjectSize (file_size - object_file_offset); spec.GetObjectModificationTime () = object_mod_time; } } |