<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
diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp
index f42cc71..d1b65a5 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -264,7 +264,12 @@
 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