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

via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 1 10:49:04 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Charles Zablit (charles-zablit)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/200885.diff


1 Files Affected:

- (modified) lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp (+1) 


``````````diff
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.

``````````

</details>


https://github.com/llvm/llvm-project/pull/200885


More information about the lldb-commits mailing list