forked from OSchip/llvm-project
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! llvm-svn: 369788
This commit is contained in:
parent
05f56a1ddd
commit
e7823a5316
|
@ -430,7 +430,7 @@ NativeProcessWindows::OnDebugException(bool first_chance,
|
|||
|
||||
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(bool first_chance,
|
|||
// 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}.",
|
||||
|
|
Loading…
Reference in New Issue