Unverified Commit 07af8af3 authored by Gennadiy Civil's avatar Gennadiy Civil Committed by GitHub
Browse files

Merge pull request #1523 from leissa/int3

provide alternative for DebugBreak()
parents 7d955430 98687b78
...@@ -4549,6 +4549,9 @@ void UnitTest::AddTestPartResult( ...@@ -4549,6 +4549,9 @@ void UnitTest::AddTestPartResult(
// when a failure happens and both the --gtest_break_on_failure and // when a failure happens and both the --gtest_break_on_failure and
// the --gtest_catch_exceptions flags are specified. // the --gtest_catch_exceptions flags are specified.
DebugBreak(); DebugBreak();
#elif (defined(__clang__) || defined(__GNUC__)) && (defined(__x86_64__) || defined(__i386__))
// with clang/gcc we can achieve the same effect on x86 by invoking int3
asm("int3");
#else #else
// Dereference NULL through a volatile pointer to prevent the compiler // Dereference NULL through a volatile pointer to prevent the compiler
// from removing. We use this rather than abort() or __builtin_trap() for // from removing. We use this rather than abort() or __builtin_trap() for
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment