blob: 4b0e23a3d577de117c16b133f947c60c2e87af9f [file] [log] [blame]
nethercotee365ff52004-11-12 17:12:04 +00001// XXX: x86-specific, so these should be in x86/, or something
2#include "../../coregrind/x86-linux/vki_unistd.h"
3
nethercote75a8c982004-11-11 19:03:34 +00004#include <assert.h>
5#include <fcntl.h>
6#include <stdio.h>
7#include <stdlib.h>
nethercote75a8c982004-11-11 19:03:34 +00008#include <sys/syscall.h>
nethercote9a3beb92004-11-12 17:07:26 +00009#include <sys/stat.h>
10#include <sys/ptrace.h>
nethercote75a8c982004-11-11 19:03:34 +000011#include <sys/types.h>
12
nethercotee365ff52004-11-12 17:12:04 +000013// Since we use vki_unistd.h, we can't include <unistd.h>. So we have to
14// declare this ourselves.
15extern long int syscall (long int __sysno, ...) __THROW;
16
nethercote75a8c982004-11-11 19:03:34 +000017// Thorough syscall scalar arg checking. Also serves as thorough checking
18// for (very) basic syscall use. Generally not trying to do anything
19// meaningful with the syscalls.
20
21#define GO(__NR_xxx, s) \
22 fprintf(stderr, "-----------------------------------------------------\n" \
23 "%3d:%20s %s\n" \
24 "-----------------------------------------------------\n", \
25 __NR_xxx, #__NR_xxx, s);
26
27#define SY syscall
28
29