diff options
-rw-r--r-- | tests/test.S | 12 | ||||
-rw-r--r-- | tools/machchk.sh | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/test.S b/tests/test.S new file mode 100644 index 0000000..df907a6 --- /dev/null +++ b/tests/test.S @@ -0,0 +1,12 @@ +#include <sys/sycall.h> + + .text + .globl _start +_start: + nop /* Debug start (step-in here) */ + movq $0xDEADBEEF, %rdx + nop /* Debug end, exit start (step-out here) */ + movq $SYS_EXIT, %rax + xor %rdi, %rdi + syscall + ud2 diff --git a/tools/machchk.sh b/tools/machchk.sh new file mode 100644 index 0000000..fc8952e --- /dev/null +++ b/tools/machchk.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +getdefs() { + gcc -dM -E - </dev/null | grep -E \ + "(__x86_64__|__amd64__|__i386__|__arm__|\ + __aarch64__|__linux__|__WIN32__|__APPLE__)" +} + +echo "Dumping GCC machdep defines..." +echo "****************************************************" +getdefs +echo "****************************************************" |