Index: qemu/Makefile.target =================================================================== --- qemu.orig/Makefile.target 2007-06-02 11:43:16.000000000 -0400 +++ qemu/Makefile.target 2007-06-02 11:43:22.000000000 -0400 @@ -240,7 +240,7 @@ endif ifdef CONFIG_LINUX_USER -OBJS= main.o syscall.o mmap.o signal.o path.o osdep.o thunk.o \ +OBJS= main.o syscall.o syscall_names.o mmap.o signal.o path.o osdep.o thunk.o \ elfload.o linuxload.o LIBS+= $(AIOLIBS) ifdef TARGET_HAS_BFLT Index: qemu/linux-user/syscall.c =================================================================== --- qemu.orig/linux-user/syscall.c 2007-06-02 11:43:16.000000000 -0400 +++ qemu/linux-user/syscall.c 2007-06-02 12:30:10.000000000 -0400 @@ -2724,6 +2724,7 @@ #ifdef DEBUG gemu_log("syscall %d", num); + print_syscall(num, arg1, arg2, arg3, arg4, arg5, arg6); #endif switch(num) { case TARGET_NR_exit: @@ -4906,6 +4907,7 @@ } fail: #ifdef DEBUG + /* use this to end lines output by print_syscall() above */ gemu_log(" = %ld\n", ret); #endif return ret; Index: qemu/linux-user/syscall_names.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ qemu/linux-user/syscall_names.c 2007-06-02 12:26:31.000000000 -0400 @@ -0,0 +1,30 @@ +#include +#include "qemu.h" + +struct syscallname { + int nr; + char *name; + char *format; +}; + +static struct syscallname scnames[] = { +#include "syscall_names.list" +}; + +static int nsyscalls = sizeof(scnames)/sizeof(struct syscallname); + +void +print_syscall(int num, long arg1, long arg2, long arg3, + long arg4, long arg5, long arg6) +{ +int i; +char *format="%s(%ld,%ld,%ld,%ld,%ld,%ld)"; + +for(i=0;i