summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2019-08-23 17:58:53 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2019-08-23 17:58:53 +0000
commite7823a53164b0526c9463fc9515f42d5c53651db (patch)
tree216316644c75af3f04f03de1edb7c36ed90d82c8 /lldb/source/Plugins/Process
parent05f56a1ddd67c65e4554d4c7a38a9d511c0ecf20 (diff)
downloadbcm5719-llvm-e7823a53164b0526c9463fc9515f42d5c53651db.tar.gz
bcm5719-llvm-e7823a53164b0526c9463fc9515f42d5c53651db.zip
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
Diffstat (limited to 'lldb/source/Plugins/Process')
-rw-r--r--lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
index 2283b5391f3..71ad57c45c7 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
@@ -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}.",
OpenPOWER on IntegriCloud