From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,bf1412c100a060d9 X-Google-Attributes: gidfee84,public From: patchkov@acs1.acs.ucalgary.ca (Serguei Patchkovskii) Subject: Re: [Q] parameter passing & return values of system call Date: 1999/07/20 Message-ID: <7n24kv$gh8@ds2.acs.ucalgary.ca>#1/1 X-Deja-AN: 503157929 References: Organization: The University of Calgary Newsgroups: comp.unix.osf.osf1 Kim, Hyunchul (kimhc@inzen.com) wrote: : I'm writing a program which examines the system calls of other processes. : With "/proc" file system and some ioctl calls(), : I succeeded for it to make another process stop when system call. : But I don't know how to get the parameters of the system call and : return value or error flag of it. Syscall number is in the register 0 (of gregset_t.regs obtained by PIOCSREG). Syscall parameters are in the registers 16 to 19 (decimal). Return code OR error code is in the register 0 (and, I guess, also 1 if you are doing pipe() - but I had not checked this). The meaning of the return code is given by the value of the register 19: zero means successful completion (with the return code in reg. 0); non-zero is error condition, with errno value in reg. 0. Regards, /Serge.P -- home page: http://www.cobalt.chem.ucalgary.ca/ps/