diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/catch-syscall.c')
-rw-r--r-- | gdb/testsuite/gdb.base/catch-syscall.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/catch-syscall.c b/gdb/testsuite/gdb.base/catch-syscall.c new file mode 100644 index 00000000000..64850de9572 --- /dev/null +++ b/gdb/testsuite/gdb.base/catch-syscall.c @@ -0,0 +1,25 @@ +/* This file is used to test the 'catch syscall' feature on GDB. + + Please, if you are going to edit this file DO NOT change the syscalls + being called (nor the order of them). If you really must do this, then + take a look at catch-syscall.exp and modify there too. + + Written by Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com> + September, 2008 */ + +#include <unistd.h> +#include <fcntl.h> +#include <sys/stat.h> + +int +main (void) +{ + /* A close() with a wrong argument. We are only + interested in the syscall. */ + close (-1); + + chroot ("."); + + /* The last syscall. Do not change this. */ + _exit (0); +} |