[Lldb-commits] [lldb] [lldb][Windows] Format in-process x86 and x64 GPRs as lowercase hex (PR #227299)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 29 05:54:18 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Charles Zablit (charles-zablit)
<details>
<summary>Changes</summary>
The in-process Windows plugin printed `x86`/`x64` registers in uppercase hex, unlike every other register table.
`Test11588` compares against lowercase hex, so it only passed when the address happened to have no letters.
This patch uses lowercase hex, matching `lldb-server`. Test11588 is re-enabled.
---
Full diff: https://github.com/llvm/llvm-project/pull/227299.diff
3 Files Affected:
- (modified) lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp (+4-4)
- (modified) lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp (+1-1)
- (modified) lldb/test/API/commands/expression/issue_11588/Test11588.py (-1)
``````````diff
diff --git a/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp b/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
index e649e7e4962cf..ae1e7a47e92bc 100644
--- a/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
@@ -27,7 +27,7 @@ using namespace lldb_private;
#define DEFINE_GPR(reg, alt, generic) \
{ \
- #reg, alt, 8, 0, eEncodingUint, eFormatHexUppercase, \
+ #reg, alt, 8, 0, eEncodingUint, eFormatHex, \
{dwarf_##reg##_x86_64, dwarf_##reg##_x86_64, generic, \
LLDB_INVALID_REGNUM, lldb_##reg##_x86_64 }, \
nullptr, nullptr, nullptr, \
@@ -42,7 +42,7 @@ using namespace lldb_private;
#define DEFINE_GPR_PSEUDO_32(reg) \
{ \
- #reg, nullptr, 4, 0, eEncodingUint, eFormatHexUppercase, \
+ #reg, nullptr, 4, 0, eEncodingUint, eFormatHex, \
{LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
LLDB_INVALID_REGNUM, lldb_##reg##_x86_64 }, \
nullptr, nullptr, nullptr, \
@@ -50,7 +50,7 @@ using namespace lldb_private;
#define DEFINE_GPR_PSEUDO_16(reg) \
{ \
- #reg, nullptr, 2, 0, eEncodingUint, eFormatHexUppercase, \
+ #reg, nullptr, 2, 0, eEncodingUint, eFormatHex, \
{LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
LLDB_INVALID_REGNUM, lldb_##reg##_x86_64 }, \
nullptr, nullptr, nullptr, \
@@ -58,7 +58,7 @@ using namespace lldb_private;
#define DEFINE_GPR_PSEUDO_8(reg) \
{ \
- #reg, nullptr, 1, 0, eEncodingUint, eFormatHexUppercase, \
+ #reg, nullptr, 1, 0, eEncodingUint, eFormatHex, \
{LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
LLDB_INVALID_REGNUM, lldb_##reg##_x86_64 }, \
nullptr, nullptr, nullptr, \
diff --git a/lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp b/lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
index 76da20f5a942c..3613120f5e3b9 100644
--- a/lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
@@ -25,7 +25,7 @@
using namespace lldb;
using namespace lldb_private;
-#define DEFINE_GPR(reg, alt) #reg, alt, 4, 0, eEncodingUint, eFormatHexUppercase
+#define DEFINE_GPR(reg, alt) #reg, alt, 4, 0, eEncodingUint, eFormatHex
#define DEFINE_GPR_BIN(reg, alt) #reg, alt, 4, 0, eEncodingUint, eFormatBinary
namespace {
diff --git a/lldb/test/API/commands/expression/issue_11588/Test11588.py b/lldb/test/API/commands/expression/issue_11588/Test11588.py
index b4caee36b01cc..ebd16084a1784 100644
--- a/lldb/test/API/commands/expression/issue_11588/Test11588.py
+++ b/lldb/test/API/commands/expression/issue_11588/Test11588.py
@@ -12,7 +12,6 @@
class Issue11581TestCase(TestBase):
- @skipIfWindows # This test is now flaky on windows, see llvm.org/pr24778
def test_11581_commands(self):
# This is the function to remove the custom commands in order to have a
# clean slate for the next test case.
``````````
</details>
https://github.com/llvm/llvm-project/pull/227299
More information about the lldb-commits
mailing list