[Lldb-commits] [lldb] [lldb][Windows] Format in-process x86 and x64 GPRs as lowercase hex (PR #227299)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 29 05:53:34 PDT 2026
https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/227299
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.
>From 211efb16f2ad69eb785f06547d761df4df55f614 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Tue, 29 Sep 2026 13:52:27 +0100
Subject: [PATCH] [lldb][Windows] Format in-process x86 and x64 GPRs as
lowercase hex
---
.../Windows/Common/x64/RegisterContextWindows_x64.cpp | 8 ++++----
.../Windows/Common/x86/RegisterContextWindows_x86.cpp | 2 +-
.../test/API/commands/expression/issue_11588/Test11588.py | 1 -
3 files changed, 5 insertions(+), 6 deletions(-)
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.
More information about the lldb-commits
mailing list