summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Symbol/ObjectFile.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/Symbol/ObjectFile.cpp b/lldb/source/Symbol/ObjectFile.cpp
index 4f6d74bbc75..812c6de4da5 100644
--- a/lldb/source/Symbol/ObjectFile.cpp
+++ b/lldb/source/Symbol/ObjectFile.cpp
@@ -477,7 +477,13 @@ size_t ObjectFile::GetData(lldb::offset_t offset, size_t length,
DataExtractor &data) const {
// The entire file has already been mmap'ed into m_data, so just copy from
// there as the back mmap buffer will be shared with shared pointers.
- return data.SetData(m_data, offset, length);
+ size_t ret = data.SetData(m_data, offset, length);
+ // DataExtractor::SetData copies the address byte size from m_data, but
+ // m_data's address byte size is only set from sizeof(void*), and we can't
+ // access subclasses GetAddressByteSize() when setting up m_data in the
+ // constructor.
+ data.SetAddressByteSize(GetAddressByteSize());
+ return ret;
}
size_t ObjectFile::CopyData(lldb::offset_t offset, size_t length,
OpenPOWER on IntegriCloud