[Lldb-commits] [lldb] [lldb][windows] return false in default branch of RegisterContextWindows_x86::WriteRegister (PR #200885)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 1 10:48:22 PDT 2026


https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/200885

Other implementations return `false` if something went wrong. The default branch just logs an error and continues. This patch converts it to return `false` instead.

>From 38462f6a3743119699930e85d0bbdcf868116448 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Mon, 1 Jun 2026 18:45:34 +0100
Subject: [PATCH] [lldb][windows] return false in default branch of
 RegisterContextWindows_x86::WriteRegister

---
 .../Process/Windows/Common/x86/RegisterContextWindows_x86.cpp    | 1 +
 1 file changed, 1 insertion(+)

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 02e7e8529ca68..76da20f5a942c 100644
--- a/lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
@@ -258,6 +258,7 @@ bool RegisterContextWindows_x86::WriteRegister(const RegisterInfo *reg_info,
   default:
     LLDB_LOG(log, "Write value {0:x} to unknown register {1}",
              reg_value.GetAsUInt32(), reg);
+    return false;
   }
 
   // Physically update the registers in the target process.



More information about the lldb-commits mailing list