aboutsummaryrefslogtreecommitdiff
path: root/include
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
commit7980d35608225dc71b3dd946d4c3aea85bc24e85 (patch)
tree07c3f831e7dfb9ebb3beb1268a638ed61f3fb76d /include
parent26345cbada66df8e698111cdf8d1689ccefe8331 (diff)
downloadlldb-7980d35608225dc71b3dd946d4c3aea85bc24e85.tar.gz
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 git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186211 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/lldb/Core/ModuleSpec.h22
-rw-r--r--include/lldb/Symbol/ObjectFile.h3
2 files changed, 23 insertions, 2 deletions
diff --git a/include/lldb/Core/ModuleSpec.h b/include/lldb/Core/ModuleSpec.h
index 67bd4ba3d..10e1ea9f1 100644
--- a/include/lldb/Core/ModuleSpec.h
+++ b/include/lldb/Core/ModuleSpec.h
@@ -350,7 +350,6 @@ public:
strm.PutCString("uuid = ");
m_uuid.Dump(&strm);
dumped_something = true;
-
}
if (m_object_name)
{
@@ -359,6 +358,20 @@ public:
strm.Printf("object_name = %s", m_object_name.GetCString());
dumped_something = true;
}
+ if (m_object_offset > 0)
+ {
+ if (dumped_something)
+ strm.PutCString(", ");
+ strm.Printf("object_offset = 0x%" PRIx64, m_object_offset);
+ dumped_something = true;
+ }
+ if (m_object_mod_time.IsValid())
+ {
+ if (dumped_something)
+ strm.PutCString(", ");
+ strm.Printf("object_mod_time = 0x%" PRIx64, m_object_mod_time.GetAsSecondsSinceJan1_1970());
+ dumped_something = true;
+ }
}
bool
@@ -479,6 +492,13 @@ public:
m_specs.insert(m_specs.end(), rhs.m_specs.begin(), rhs.m_specs.end());
}
+ // The index "i" must be valid and this can't be used in
+ // multi-threaded code as no mutex lock is taken.
+ ModuleSpec &
+ GetModuleSpecRefAtIndex (size_t i)
+ {
+ return m_specs[i];
+ }
bool
GetModuleSpecAtIndex (size_t i, ModuleSpec &module_spec) const
{
diff --git a/include/lldb/Symbol/ObjectFile.h b/include/lldb/Symbol/ObjectFile.h
index 37068978e..8934c31bb 100644
--- a/include/lldb/Symbol/ObjectFile.h
+++ b/include/lldb/Symbol/ObjectFile.h
@@ -182,6 +182,7 @@ public:
static size_t
GetModuleSpecifications (const FileSpec &file,
lldb::offset_t file_offset,
+ lldb::offset_t file_size,
ModuleSpecList &specs);
static size_t
@@ -189,7 +190,7 @@ public:
lldb::DataBufferSP& data_sp,
lldb::offset_t data_offset,
lldb::offset_t file_offset,
- lldb::offset_t length,
+ lldb::offset_t file_size,
lldb_private::ModuleSpecList &specs);
//------------------------------------------------------------------
/// Split a path into a file path with object name.