blob: d1f3d34bcb3bb4ff3c450926da46944344773caf [file] [log] [blame]
nethercote75a8c982004-11-11 19:03:34 +00001#include <assert.h>
2#include <fcntl.h>
3#include <stdio.h>
4#include <stdlib.h>
5#include <unistd.h>
nethercote75a8c982004-11-11 19:03:34 +00006#include <sys/syscall.h>
nethercote9a3beb92004-11-12 17:07:26 +00007#include <sys/stat.h>
8#include <sys/ptrace.h>
nethercote75a8c982004-11-11 19:03:34 +00009#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