[Lldb-commits] [lldb] r369788 - Windows: explicitly cast constants to `DWORD`
Saleem Abdulrasool via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 23 10:58:53 PDT 2019
Author: compnerd
Date: Fri Aug 23 10:58:53 2019
New Revision: 369788
URL: http://llvm.org/viewvc/llvm-project?rev=369788&view=rev
Log:
Windows: explicitly cast constants to `DWORD`
STATUS_SINGLE_STEP and STATUS_BREAKPOINT are defined as 0x8------ which
is negative and thus can't be implicitly narrowed to a DWORD which is
unsigned. The value is defined differently across winnt.h and ntstatus.h.
Patch by Gwen Mittertreiner!
Modified:
lldb/trunk/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
Modified: lldb/trunk/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp?rev=369788&r1=369787&r2=369788&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp Fri Aug 23 10:58:53 2019
@@ -430,7 +430,7 @@ NativeProcessWindows::OnDebugException(b
ExceptionResult result = ExceptionResult::SendToApplication;
switch (record.GetExceptionCode()) {
- case STATUS_SINGLE_STEP:
+ case DWORD(STATUS_SINGLE_STEP):
case STATUS_WX86_SINGLE_STEP:
StopThread(record.GetThreadID(), StopReason::eStopReasonTrace);
SetState(eStateStopped, true);
@@ -438,7 +438,7 @@ NativeProcessWindows::OnDebugException(b
// Continue the debugger.
return ExceptionResult::MaskException;
- case STATUS_BREAKPOINT:
+ case DWORD(STATUS_BREAKPOINT):
case STATUS_WX86_BREAKPOINT:
if (FindSoftwareBreakpoint(record.GetExceptionAddress())) {
LLDB_LOG(log, "Hit non-loader breakpoint at address {0:x}.",
More information about the lldb-commits
mailing list