From 4fb073ac73285d8c96729c335817a4683c5c0033 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Mon, 24 Sep 2018 11:20:13 -0400 Subject: [PATCH] use __builtin_debugtrap() in sk_abort_no_print() where possible I got a little jealous of the Windows version of this that breaks into the debugger. Using __builtin_debugtrap() here should have basically the effect of abort() when not under a debugger, but lets you continue on if you want when run under a debugger. Change-Id: If5f12776758b1753ffad083b34a53661450b0812 Reviewed-on: https://skia-review.googlesource.com/156248 Auto-Submit: Mike Klein Commit-Queue: Brian Osman Reviewed-by: Brian Osman --- src/ports/SkMemory_malloc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ports/SkMemory_malloc.cpp b/src/ports/SkMemory_malloc.cpp index 29e75433b9..fd09af9860 100644 --- a/src/ports/SkMemory_malloc.cpp +++ b/src/ports/SkMemory_malloc.cpp @@ -37,6 +37,8 @@ void sk_abort_no_print() { #endif #if defined(SK_DEBUG) && defined(SK_BUILD_FOR_WIN) __debugbreak(); +#elif defined(__clang__) + __builtin_debugtrap(); #else abort(); #endif