Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Re: [Q] parameter passing & return values of system call
  1999-07-20  4:00 [Q] parameter passing & return values of system call Kim, Hyunchul
@ 1999-07-20  4:00 ` Serguei Patchkovskii
  0 siblings, 0 replies; 2+ messages in thread
From: Serguei Patchkovskii @ 1999-07-20  4:00 UTC (permalink / raw)


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/



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Q] parameter passing & return values of system call
@ 1999-07-20  4:00 Kim, Hyunchul
  1999-07-20  4:00 ` Serguei Patchkovskii
  0 siblings, 1 reply; 2+ messages in thread
From: Kim, Hyunchul @ 1999-07-20  4:00 UTC (permalink / raw)



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.

How are the parameters and return value passed?
Or where can i find the infomation?


Thanks.






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-07-20  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-07-20  4:00 [Q] parameter passing & return values of system call Kim, Hyunchul
1999-07-20  4:00 ` Serguei Patchkovskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox