From: Roland McGrath Date: Mon, 20 Jan 2003 09:04:36 +0000 (+0000) Subject: 2003-01-20 Roland McGrath X-Git-Tag: v4.5.18~838 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b3082206c5ea5ea41259c8b013138c6f6b6463a;p=strace 2003-01-20 Roland McGrath * util.c (restore_arg0): Evaluate args in no-op defns. * util.c [S390 || S390X] (arg0_offset, arg1_offset): Fix definitions for clone call on S390. From Michael Holzheu . --- diff --git a/util.c b/util.c index 32f8d098..7b626206 100644 --- a/util.c +++ b/util.c @@ -1195,17 +1195,21 @@ typedef struct regs arg_setup_state; #else # if defined S390 || defined S390X -# define arg0_offset PT_ORIGGPR2 -# define arg1_offset PT_GPR2 -# define restore_arg0(tcp, state, val) 0 -# define restore_arg1(tcp, state, val) 0 +/* Note: this is only true for the `clone' system call, which handles + arguments specially. We could as well say that its first two arguments + are swapped relative to other architectures, but that would just be + another #ifdef in the calls. */ +# define arg0_offset PT_GPR3 +# define arg1_offset PT_ORIGGPR2 +# define restore_arg0(tcp, state, val) ((void) (state), 0) +# define restore_arg1(tcp, state, val) ((void) (state), 0) # elif defined (ALPHA) || defined (MIPS) # define arg0_offset REG_A0 # define arg1_offset (REG_A0+1) # elif defined (POWERPC) # define arg0_offset (sizeof(unsigned long)*PT_R3) # define arg1_offset (sizeof(unsigned long)*PT_R4) -# define restore_arg0(tcp, state, val) 0 +# define restore_arg0(tcp, state, val) ((void) (state), 0) # elif defined (HPPA) # define arg0_offset PT_GR26 # define arg1_offset (PT_GR26-4)