Also treat DBG_PRINTEXCEPTION* as debug exceptions

Windows 10 now raises an exception when OutputDebugString* are called:
(https://ntquery.wordpress.com/2015/09/07/windows-10-new-anti-debug-outputdebugstringw/)
This change ignores these exception types such that they're not falsely
identified as a crash.

BUG=

Change-Id: I1326212662d46e16407681d5ea6377f63ee188ce
Reviewed-on: https://chromium-review.googlesource.com/398998
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Tim Angus 2016-10-14 15:27:54 +01:00 committed by Mark Mentovai
parent 48a13da168
commit 6b2f69dd10

View file

@ -476,7 +476,9 @@ LONG ExceptionHandler::HandleException(EXCEPTION_POINTERS* exinfo) {
DWORD code = exinfo->ExceptionRecord->ExceptionCode;
LONG action;
bool is_debug_exception = (code == EXCEPTION_BREAKPOINT) ||
(code == EXCEPTION_SINGLE_STEP);
(code == EXCEPTION_SINGLE_STEP) ||
(code == DBG_PRINTEXCEPTION_C) ||
(code == DBG_PRINTEXCEPTION_WIDE_C);
if (code == EXCEPTION_INVALID_HANDLE &&
current_handler->consume_invalid_handle_exceptions_) {