From e1d91ba06d250dd8bbd5bded4824c5b210c2667a Mon Sep 17 00:00:00 2001 From: Alexandre Ganea Date: Fri, 11 Apr 2025 13:07:30 -0400 Subject: [PATCH] [lldb] Fix erroneous return value Found when building with MSVC on Windows, was seeing: ``` [2703/7138] Building CXX object tools\lldb\source\Plugins\Process\Utility\CMakeFiles\lldbPluginProcessUtility.dir\NativeRegisterContextDBReg.cpp.obj C:\git\llvm-project\lldb\source\Plugins\Process\Utility\NativeRegisterContextDBReg.cpp(286): warning C4305: 'return': truncation from 'unsigned int' to 'bool' ``` --- .../Plugins/Process/Utility/NativeRegisterContextDBReg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg.cpp b/lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg.cpp index 1e0c1a5db09c..19601b7f35d4 100644 --- a/lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg.cpp +++ b/lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg.cpp @@ -283,7 +283,7 @@ bool NativeRegisterContextDBReg::ClearHardwareWatchpoint(uint32_t wp_index) { LLDB_LOG_ERROR( log, std::move(error), "unable to set watchpoint: failed to read debug registers: {0}"); - return LLDB_INVALID_INDEX32; + return false; } if (wp_index >= m_max_hwp_supported)