summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
diff options
context:
space:
mode:
authorRavitheja Addepally <ravitheja.addepally@intel.com>2016-01-19 12:55:21 +0000
committerRavitheja Addepally <ravitheja.addepally@intel.com>2016-01-19 12:55:21 +0000
commit15f89c420bc090b1a307bde1fea799aae7dbb646 (patch)
tree391c598b995c46d4e7f4fbf3649002a8a398e928 /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
parentf8f2d46002932c0834a4ca2d009b8e4766c9d129 (diff)
downloadbcm5719-llvm-15f89c420bc090b1a307bde1fea799aae7dbb646.tar.gz
bcm5719-llvm-15f89c420bc090b1a307bde1fea799aae7dbb646.zip
Fix for Bug 25338
Summary: The issue arises because LLDB is not able to read the vdso library correctly. The fix adds memory allocation callbacks to allocate sufficient memory in case the requested offsets don't fit in the memory buffer allocated for the ELF. Reviewers: lldb-commits, clayborg, deepak2427, ovyalov, labath, tberghammer Differential Revision: http://reviews.llvm.org/D16107 llvm-svn: 258122
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h')
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
index 8c5a0037bab..48ae96a7c26 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
@@ -14,6 +14,7 @@
#include <stdint.h>
// C++ Includes
+#include <functional>
#include <vector>
// Other libraries and framework includes
@@ -231,6 +232,7 @@ private:
typedef DynamicSymbolColl::const_iterator DynamicSymbolCollConstIter;
typedef std::map<lldb::addr_t, lldb::AddressClass> FileAddressToAddressClassMap;
+ typedef std::function<lldb::offset_t (lldb_private::DataExtractor &, lldb::offset_t, lldb::offset_t)> SetDataFunction;
/// Version of this reader common to all plugins based on this class.
static const uint32_t m_plugin_version = 1;
@@ -279,7 +281,7 @@ private:
// Parses the ELF program headers.
static size_t
GetProgramHeaderInfo(ProgramHeaderColl &program_headers,
- lldb_private::DataExtractor &data,
+ const SetDataFunction &set_data,
const elf::ELFHeader &header);
// Finds PT_NOTE segments and calculates their crc sum.
@@ -302,7 +304,7 @@ private:
/// Parses the elf section headers and returns the uuid, debug link name, crc, archspec.
static size_t
GetSectionHeaderInfo(SectionHeaderColl &section_headers,
- lldb_private::DataExtractor &data,
+ const SetDataFunction &set_data,
const elf::ELFHeader &header,
lldb_private::UUID &uuid,
std::string &gnu_debuglink_file,
@@ -437,6 +439,13 @@ private:
static lldb_private::Error
RefineModuleDetailsFromNote (lldb_private::DataExtractor &data, lldb_private::ArchSpec &arch_spec, lldb_private::UUID &uuid);
+
+
+ static lldb::offset_t
+ SetData(const lldb_private::DataExtractor &src, lldb_private::DataExtractor &dst, lldb::offset_t offset, lldb::offset_t length);
+
+ lldb::offset_t
+ SetDataWithReadMemoryFallback(lldb_private::DataExtractor &dst, lldb::offset_t offset, lldb::offset_t length);
};
#endif // liblldb_ObjectFileELF_h_
OpenPOWER on IntegriCloud