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

Matej Košík via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 15 14:58:16 PDT 2025


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

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.

>From b2fb3922d6857815fb757db73036675194bcaced Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= <matej.kosik at codasip.com>
Date: Wed, 15 Oct 2025 23:52:48 +0200
Subject: [PATCH] [lldb] fix the "RegisterValue::SetValueFromData" method

Fix the "RegisterValue::SetValueFromData" so that it works
also for 128-bit registers that contain integers.
---
 lldb/source/Utility/RegisterValue.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 {



More information about the lldb-commits mailing list