mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
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:
parent
38af8d7035
commit
70d3c937c3
@ -23,14 +23,12 @@ namespace Catch{
|
||||
|
||||
// The following code snippet based on:
|
||||
// http://cocoawithlove.com/2008/03/break-into-debugger.html
|
||||
#ifdef DEBUG
|
||||
#if defined(__ppc64__) || defined(__ppc__)
|
||||
#define CATCH_TRAP() \
|
||||
__asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \
|
||||
: : : "memory","r0","r3","r4" )
|
||||
#else
|
||||
#define CATCH_TRAP() _asm__("int $3\n" : : )
|
||||
#endif
|
||||
#define CATCH_TRAP() __asm__("int $3\n" : : )
|
||||
#endif
|
||||
|
||||
#elif defined(CATCH_PLATFORM_LINUX)
|
||||
|
Loading…
Reference in New Issue
Block a user