================
@@ -207,6 +207,18 @@ Status RegisterValue::SetValueFromData(const RegisterInfo
®_info,
int128.x[1] = data1;
}
SetUInt128(llvm::APInt(128, 2, int128.x));
+ } else {
+ std::vector<uint8_t> bytes(src_len, 0);
+ for (size_t i = 0; i < src_len; i++)
+ bytes[i] = src.GetU8(&src_offset);
+ if (src.GetByteOrder() == eByteOrderBig)
+ std::reverse(bytes.begin(), bytes.end());
+ // The number of 64-bit wide words that are stored in "src".
----------------
sedymrak wrote:
I have pushed commit that (hopefully) explains the situation.
We have to be more careful when LLDB is running on big-endian machine. Below we
call `llvm::LoadIntFromMemory` function. On big-endian machine that function
reads from the provided region of memory in 64-bit (i.e. 8 byte) chunks. We
must ensure that the whole value is stored in a memory region whose size a
(smallest) multiple of 64-bit (i.e. 8 bytes).
https://github.com/llvm/llvm-project/pull/166363
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits