[Lldb-commits] [PATCH] D71108: [LLDB] [PECOFF] Make sure to set the address byte size in m_data after parsing headers
Martin Storsjö via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 10 04:03:20 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa0f72441c898: [LLDB] [PECOFF] Make sure to set the address byte size in m_data after parsing… (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71108/new/
https://reviews.llvm.org/D71108
Files:
lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
lldb/source/Symbol/ObjectFile.cpp
Index: lldb/source/Symbol/ObjectFile.cpp
===================================================================
--- lldb/source/Symbol/ObjectFile.cpp
+++ lldb/source/Symbol/ObjectFile.cpp
@@ -477,13 +477,7 @@
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.
- 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;
+ return data.SetData(m_data, offset, length);
}
size_t ObjectFile::CopyData(lldb::offset_t offset, size_t length,
Index: lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
===================================================================
--- lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -315,6 +315,7 @@
ParseCOFFOptionalHeader(&offset);
ParseSectionHeaders(offset);
}
+ m_data.SetAddressByteSize(GetAddressByteSize());
return true;
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71108.233044.patch
Type: text/x-patch
Size: 1360 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191210/3309ce4b/attachment-0001.bin>
More information about the lldb-commits
mailing list