diff options
author | Greg Clayton <gclayton@apple.com> | 2012-08-11 00:49:14 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-08-11 00:49:14 +0000 |
commit | 7f4c7430f7412a697caabf31815686eba1490afa (patch) | |
tree | f76fc6ff53fc3ec7c30d5d703ce1e52df0046af3 /lldb/source/Expression/DWARFExpression.cpp | |
parent | 1fdbee5a6b134f80e5f0862cdd192c6bac4379eb (diff) | |
download | bcm5719-llvm-7f4c7430f7412a697caabf31815686eba1490afa.tar.gz bcm5719-llvm-7f4c7430f7412a697caabf31815686eba1490afa.zip |
<rdar://problem/11791234>
Remember to copy the address byte size and the byte order when copying data into a DWARF location object, or things will go wrong.
llvm-svn: 161721
Diffstat (limited to 'lldb/source/Expression/DWARFExpression.cpp')
-rw-r--r-- | lldb/source/Expression/DWARFExpression.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp index f42cc7107a7..d1b65a5fca4 100644 --- a/lldb/source/Expression/DWARFExpression.cpp +++ b/lldb/source/Expression/DWARFExpression.cpp @@ -264,7 +264,12 @@ void DWARFExpression::CopyOpcodeData (const DataExtractor& data, uint32_t data_offset, uint32_t data_length) { const uint8_t *bytes = data.PeekData(data_offset, data_length); - m_data.SetData(DataBufferSP(new DataBufferHeap(bytes, data_length))); + if (bytes) + { + m_data.SetData(DataBufferSP(new DataBufferHeap(bytes, data_length))); + m_data.SetByteOrder(data.GetByteOrder()); + m_data.SetAddressByteSize(data.GetAddressByteSize()); + } } void |