{ 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */
{ 1, TP, sys_exit, "_exit", }, /* 1 */
- { 0, TP, sys_fork, "fork", SYS_fork }, /* 2 */
+ { 0, TP, sys_fork, "fork", }, /* 2 */
{ 3, TD, sys_read, "read", }, /* 3 */
{ 3, TD, sys_write, "write", }, /* 4 */
{ 3, TD|TF, sys_open, "open" }, /* 5 */
{ 6, TI, sys_ipc, "ipc", }, /* 117 */
{ 1, TD, sys_fsync, "fsync" }, /* 118 */
{ 0, TS, sys_sigreturn, "sigreturn" }, /* 119 */
- { 5, TP, sys_clone, "clone", SYS_clone }, /* 120 */
+ { 5, TP, sys_clone, "clone" }, /* 120 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */
{ 1, 0, sys_uname, "uname" }, /* 122 */
{ 3, 0, sys_modify_ldt, "modify_ldt" }, /* 123 */
{ 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */
{ 5, 0, sys_getpmsg, "getpmsg" }, /* 188 */
{ 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */
- { 0, TP, sys_vfork, "vfork", SYS_vfork }, /* 190 */
+ { 0, TP, sys_vfork, "vfork" }, /* 190 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */
{ 6, TD, sys_mmap, "mmap2" }, /* 192 */
{ 3, TF, sys_truncate64, "truncate64" }, /* 193 */
#define sys_getpmsg printargs
#define sys_putpmsg printargs
#define sys_ugetrlimit printargs
-#define sys_fork printargs
#define sys_waitpid printargs
#define sys_time printargs
#define sys_break printargs
#define sys_pwrite printargs
#define sys_sigaltstack printargs
#define sys_sendfile printargs
-#define sys_vfork printargs
#define sys_truncate64 printargs
#define sys_ftruncate64 printargs
#define sys_stat64 printargs
#undef sys_getpmsg
#undef sys_putpmsg
#undef sys_ugetrlimit
-#undef sys_fork
#undef sys_waitpid
#undef sys_time
#undef sys_break
#undef sys_pwrite
#undef sys_sigaltstack
#undef sys_sendfile
-#undef sys_vfork
#undef sys_truncate64
#undef sys_ftruncate64
#undef sys_stat64
# ifdef IA64
-/* We don't have fork()/vfork() syscalls on ia64 itself, but the ia32
- subsystem has them for x86... */
-# define SYS_fork 2
-# define SYS_vfork 190
-
typedef unsigned long *arg_setup_state;
static int
# define arg_finish_change(tcp, state) 0
-# ifdef SYS_fork
static int
get_arg0(struct tcb *tcp, arg_setup_state *state, long *valp)
{
sizeof(long), (void *) valp);
return ret;
}
-# endif
static int
set_arg0(struct tcb *tcp, arg_setup_state *state, long val)
}
}
- switch (known_scno(tcp)) {
-# ifdef SYS_vfork
- case SYS_vfork:
-# endif
-# ifdef SYS_fork
- case SYS_fork:
-# endif
-# if defined SYS_fork || defined SYS_vfork
+ if (sysent[tcp->scno].sys_func == sys_fork ||
+ sysent[tcp->scno].sys_func == sys_vfork) {
if (arg_setup(tcp, &state) < 0
|| get_arg0(tcp, &state, &tcp->inst[0]) < 0
|| get_arg1(tcp, &state, &tcp->inst[1]) < 0
tcp->u_arg[arg1_index] = 0;
tcp->flags |= TCB_BPTSET;
return 0;
-# endif
+ }
- case SYS_clone: ;
-# ifdef SYS_clone2
- case SYS_clone2: ;
-# endif
+ if (sysent[tcp->scno].sys_func == sys_clone) {
/* ia64 calls directly `clone (CLONE_VFORK | CLONE_VM)'
- contrary to x86 SYS_vfork above. Even on x86 we turn the
+ contrary to x86 vfork above. Even on x86 we turn the
vfork semantics into plain fork - each application must not
depend on the vfork specifics according to POSIX. We would
hang waiting for the parent resume otherwise. We need to
tcp->inst[0] = tcp->u_arg[arg0_index];
tcp->inst[1] = tcp->u_arg[arg1_index];
return 0;
-
- default:
- fprintf(stderr, "PANIC: setbpt for syscall %ld on %u???\n",
- tcp->scno, tcp->pid);
- break;
}
+ fprintf(stderr, "PANIC: setbpt for syscall %ld on %u???\n",
+ tcp->scno, tcp->pid);
return -1;
}