diff options
| author | ptc-tgamper | 2019-12-18 14:51:09 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-02-13 16:28:02 +0100 |
| commit | ac83087bc2b774e19952753112d337786bb27e85 (patch) | |
| tree | aec1bb9fdf40efd8f7b5bad7b93d9d389b68f059 /src/catch2/catch_debugger.h | |
| parent | 123b449f8d11a2cfa92057abf04e467b5ec2124f (diff) | |
| download | catch3-ac83087bc2b774e19952753112d337786bb27e85.tar.gz | |
catch_debugger.h - implement break into debugger assembler instructions for iOS
Diffstat (limited to 'src/catch2/catch_debugger.h')
| -rw-r--r-- | src/catch2/catch_debugger.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/catch2/catch_debugger.h b/src/catch2/catch_debugger.h index e0e7ec1f..96925fc9 100644 --- a/src/catch2/catch_debugger.h +++ b/src/catch2/catch_debugger.h @@ -19,6 +19,17 @@ namespace Catch { #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */ +#elif defined(CATCH_PLATFORM_IPHONE) + + // use inline assembler + #if defined(__i386__) || defined(__x86_64__) + #define CATCH_TRAP() __asm__("int $3") + #elif defined(__aarch64__) + #define CATCH_TRAP() __asm__(".inst 0xd4200000") + #elif defined(__arm__) + #define CATCH_TRAP() __asm__(".inst 0xe7f001f0") + #endif + #elif defined(CATCH_PLATFORM_LINUX) // If we can use inline assembler, do it because this allows us to break // directly at the location of the failing check instead of breaking inside |