762abe0ce3
Since code paths are non-trivial, it's an attempt to future-proof and prevent improper access of tcp->s_ent fields. * defs.h (struct tcb): Update the description of s_ent field. (stub_sysent): New declaration. (tcp_sysent, n_args): New macro functions. * ipc.c (SYS_FUNC(ipc)): Use n_args() instead of tcp->s_ent->nargs. * linux/alpha/get_syscall_args.c (get_syscall_args): Likewise. * linux/bfin/get_syscall_args.c (get_syscall_args): Likewise. * linux/hppa/get_syscall_args.c (get_syscall_args): Likewise. * linux/ia64/get_syscall_args.c (get_syscall_args): Likewise. * linux/microblaze/get_syscall_args.c (get_syscall_args): Likewise. * linux/mips/get_syscall_args.c (get_syscall_args): Likewise. * linux/sh/get_syscall_args.c (get_syscall_args): Likewise. * linux/sh64/get_syscall_args.c (get_syscall_args): Likewise. * linux/x86_64/get_syscall_args.c (get_syscall_args): Likewise. * linux/xtensa/get_syscall_args.c (get_syscall_args): Likewise. * prctl.c (print_prctl_args): Likewise. * signal.c (SYS_FUNC(sgetmask)): Likewise. * util.c (printargs, printargs_u, printargs_d): Likewise. * syscall.c (decode_ipc_subcall, decode_syscall_subcall: Likewise. (dumpio, tamper_with_syscall_exiting, syscall_entering_decode, syscall_entering_decode, syscall_entering_trace, syscall_entering_trace, syscall_exiting_decode, print_syscall_resume, syscall_exiting_trace, get_syscall_result): Use tcp_sysent instead of tcp->s_ent(). (stub_sysent): New stub sysent. (get_scno): Reset scno, s_ent, qual_flg; initialise s->ent from stub_sysent. * pathtrace.c (pathtrace_match_set): Use tcp_sysent instead of tcp->s_ent().