[Lldb-commits] [lldb] [lldb] fix the "RegisterValue::SetValueFromData" method (PR #163646)

via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 15 14:58:47 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Matej Košík (sedymrak)

<details>
<summary>Changes</summary>

Fix the "RegisterValue::SetValueFromData" so that it works also for 128-bit registers that contain integers.

Without this change, the `RegisterValue::SetValueFromData` method does not work correctly
for 128-bit registers that contain (signed or unsigned) integers.

The original version displays the content of the 128-bit registers so that its lower and upper 64-bit halves are swapped.

---
Full diff: https://github.com/llvm/llvm-project/pull/163646.diff


1 Files Affected:

- (modified) lldb/source/Utility/RegisterValue.cpp (+1-1) 


``````````diff
diff --git a/lldb/source/Utility/RegisterValue.cpp b/lldb/source/Utility/RegisterValue.cpp
index 0e99451c3b700..12c349a143c0f 100644
--- a/lldb/source/Utility/RegisterValue.cpp
+++ b/lldb/source/Utility/RegisterValue.cpp
@@ -199,7 +199,7 @@ Status RegisterValue::SetValueFromData(const RegisterInfo &reg_info,
     else if (reg_info.byte_size <= 16) {
       uint64_t data1 = src.GetU64(&src_offset);
       uint64_t data2 = src.GetU64(&src_offset);
-      if (src.GetByteOrder() == eByteOrderBig) {
+      if (src.GetByteOrder() == eByteOrderLittle) {
         int128.x[0] = data1;
         int128.x[1] = data2;
       } else {

``````````

</details>


https://github.com/llvm/llvm-project/pull/163646


More information about the lldb-commits mailing list