summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-07-12 22:07:46 +0000
committerGreg Clayton <gclayton@apple.com>2013-07-12 22:07:46 +0000
commit2540a8a7bc063c4f5236578a5c93f1f5c46a138f (patch)
tree6e7cc6578129eb1cfbd8f820cd791a3416e68279 /lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
parentc6036aa83127c50162735e8a343623f03a3211fb (diff)
downloadbcm5719-llvm-2540a8a7bc063c4f5236578a5c93f1f5c46a138f.tar.gz
bcm5719-llvm-2540a8a7bc063c4f5236578a5c93f1f5c46a138f.zip
Fixed GetModuleSpecifications() to work better overall:
- MachO files now correctly extract the UUID all the time - More file size and offset verification done for universal mach-o files to watch for truncated files - ObjectContainerBSDArchive now supports enumerating all objects in BSD archives (.a files) - lldb_private::Module() can not be properly constructed using a ModuleSpec for a .o file in a .a file - The BSD archive plug-in shares its cache for GetModuleSpecifications() and the create callback - Improved printing for ModuleSpec objects llvm-svn: 186211
Diffstat (limited to 'lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h')
-rw-r--r--lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
index a44bb80a965..8093c580ff9 100644
--- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
+++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
@@ -136,16 +136,19 @@ protected:
static Archive::shared_ptr
FindCachedArchive (const lldb_private::FileSpec &file,
const lldb_private::ArchSpec &arch,
- const lldb_private::TimeValue &mod_time);
+ const lldb_private::TimeValue &mod_time,
+ lldb::offset_t file_offset);
static Archive::shared_ptr
ParseAndCacheArchiveForFile (const lldb_private::FileSpec &file,
const lldb_private::ArchSpec &arch,
const lldb_private::TimeValue &mod_time,
+ lldb::offset_t file_offset,
lldb_private::DataExtractor &data);
Archive (const lldb_private::ArchSpec &arch,
const lldb_private::TimeValue &mod_time,
+ lldb::offset_t file_offset,
lldb_private::DataExtractor &data);
~Archive ();
@@ -156,6 +159,14 @@ protected:
return m_objects.size();
}
+ const Object *
+ GetObjectAtIndex (size_t idx)
+ {
+ if (idx < m_objects.size())
+ return &m_objects[idx];
+ return NULL;
+ }
+
size_t
ParseObjects ();
@@ -163,6 +174,12 @@ protected:
FindObject (const lldb_private::ConstString &object_name,
const lldb_private::TimeValue &object_mod_time);
+ lldb::offset_t
+ GetFileOffset () const
+ {
+ return m_file_offset;
+ }
+
const lldb_private::TimeValue &
GetModificationTime()
{
@@ -170,11 +187,17 @@ protected:
}
const lldb_private::ArchSpec &
- GetArchitecture ()
+ GetArchitecture () const
{
return m_arch;
}
-
+
+ void
+ SetArchitecture (const lldb_private::ArchSpec &arch)
+ {
+ m_arch = arch;
+ }
+
bool
HasNoExternalReferences() const;
@@ -191,6 +214,7 @@ protected:
//----------------------------------------------------------------------
lldb_private::ArchSpec m_arch;
lldb_private::TimeValue m_time;
+ lldb::offset_t m_file_offset;
Object::collection m_objects;
ObjectNameToIndexMap m_object_name_to_index_map;
lldb_private::DataExtractor m_data; ///< The data for this object container so we don't lose data if the .a files gets modified
OpenPOWER on IntegriCloud