[Lldb-commits] [lldb] e1d91ba - [lldb] Fix erroneous return value
Alexandre Ganea via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 11 14:51:04 PDT 2025
Author: Alexandre Ganea
Date: 2025-04-11T17:50:15-04:00
New Revision: e1d91ba06d250dd8bbd5bded4824c5b210c2667a
URL: https://github.com/llvm/llvm-project/commit/e1d91ba06d250dd8bbd5bded4824c5b210c2667a
DIFF: https://github.com/llvm/llvm-project/commit/e1d91ba06d250dd8bbd5bded4824c5b210c2667a.diff
LOG: [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'
```
Added:
Modified:
lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg.cpp b/lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg.cpp
index 1e0c1a5db09ca..19601b7f35d47 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)
More information about the lldb-commits
mailing list