Enable breaking into debugger on Mac

The integrated assembler segment was missing an underscore:
"_asm__". Also we remove the "DEBUG" macro check, so we are consistent
with the linux and windows variant.
Now breaking into gdb on failure should work via:
	gdb --args test_executable --break
This commit is contained in:
Josef Kemetmueller 2017-01-23 21:19:10 +01:00 committed by Phil Nash
parent 38af8d7035
commit 70d3c937c3

View File

@ -23,14 +23,12 @@ namespace Catch{
// The following code snippet based on: // The following code snippet based on:
// http://cocoawithlove.com/2008/03/break-into-debugger.html // http://cocoawithlove.com/2008/03/break-into-debugger.html
#ifdef DEBUG #if defined(__ppc64__) || defined(__ppc__)
#if defined(__ppc64__) || defined(__ppc__) #define CATCH_TRAP() \
#define CATCH_TRAP() \ __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \
__asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \ : : : "memory","r0","r3","r4" )
: : : "memory","r0","r3","r4" ) #else
#else #define CATCH_TRAP() __asm__("int $3\n" : : )
#define CATCH_TRAP() _asm__("int $3\n" : : )
#endif
#endif #endif
#elif defined(CATCH_PLATFORM_LINUX) #elif defined(CATCH_PLATFORM_LINUX)