[Lldb-commits] [lldb] [lldb] Support arbitrary precision integer registers (PR #166363)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 7 02:18:00 PST 2025
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <m4tej.kosik at gmail.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>,
Matej =?utf-8?q?Košík?= <matej.kosik at codasip.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/166363 at github.com>
================
@@ -206,7 +206,30 @@ Status RegisterValue::SetValueFromData(const RegisterInfo ®_info,
int128.x[0] = data2;
int128.x[1] = data1;
}
- SetUInt128(llvm::APInt(128, int128.x));
+ SetUIntN(llvm::APInt(128, 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)
+ // Transform the big-endian input to little-endian
+ // because that is what the "llvm::LoadIntFromMemory" function
+ // we call below expects.
+ std::reverse(bytes.begin(), bytes.end());
----------------
DavidSpickett wrote:
Immediate thought here was don't we have a "get N bytes" function. I think ExtractBytes is that function, and it takes a byte order. Could you use that here instead?
https://github.com/llvm/llvm-project/pull/166363
More information about the lldb-commits
mailing list