[Lldb-commits] [PATCH] D66445: Explicitly Cast Constants to DWORD

Jason Mittertreiner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 19 15:05:40 PDT 2019


jmittert created this revision.
jmittert added reviewers: xiaobai, labath, JDevlieghere, asmith.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

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.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D66445

Files:
  source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp


Index: source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
===================================================================
--- source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
+++ source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
@@ -430,7 +430,7 @@
 
   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 @@
     // 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}.",


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66445.215994.patch
Type: text/x-patch
Size: 922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190819/1de1492a/attachment.bin>


More information about the lldb-commits mailing list