Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
11855d8e
Commit
11855d8e
authored
Mar 28, 2018
by
Roland Leißa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
provide alternative for DebugBreak()
This uses asm("int3") for clang/gcc on x86 as alternative for DebugBreak()
parent
9dde7c4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
gtest.cc
googletest/src/gtest.cc
+3
-0
No files found.
googletest/src/gtest.cc
View file @
11855d8e
...
@@ -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 acchieve 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment