nethercote | 75a8c98 | 2004-11-11 19:03:34 +0000 | [diff] [blame] | 1 | #include <assert.h> |
| 2 | #include <fcntl.h> |
| 3 | #include <stdio.h> |
| 4 | #include <stdlib.h> |
| 5 | #include <unistd.h> |
nethercote | 75a8c98 | 2004-11-11 19:03:34 +0000 | [diff] [blame] | 6 | #include <sys/syscall.h> |
nethercote | 9a3beb9 | 2004-11-12 17:07:26 +0000 | [diff] [blame^] | 7 | #include <sys/stat.h> |
| 8 | #include <sys/ptrace.h> |
nethercote | 75a8c98 | 2004-11-11 19:03:34 +0000 | [diff] [blame] | 9 | #include <sys/types.h> |
| 10 | |
| 11 | // Thorough syscall scalar arg checking. Also serves as thorough checking |
| 12 | // for (very) basic syscall use. Generally not trying to do anything |
| 13 | // meaningful with the syscalls. |
| 14 | |
| 15 | #define GO(__NR_xxx, s) \ |
| 16 | fprintf(stderr, "-----------------------------------------------------\n" \ |
| 17 | "%3d:%20s %s\n" \ |
| 18 | "-----------------------------------------------------\n", \ |
| 19 | __NR_xxx, #__NR_xxx, s); |
| 20 | |
| 21 | #define SY syscall |
| 22 | |
| 23 | |