On Monday 06 May 2013 19:49:01 Chris Zankel wrote: > As you said, the n-args field in syscallent serves two purposes. In the > case of readahead (int fd, off64_t offset, size_t count), for example, > these two numbers would differ: > > The syscall arguments are in a6 (fd), a3 (skipped), a4/a5 (offset), > a8(count) > Number of arguments to readahead is 3, > Number of registers used for arguments is 4, > Number of actual registers used is 5, > > Now, readahead, and possibly all other syscalls that take 64-bit > arguments are handled by specific functions, so the problem doesn't > really exist in those cases. However, looking at arm (5), powerpc (5), > mips (5), tile (4), x86 (4), they seem to use the syscallent field as > the number of registers that need to be fetched from the kernel rather > than the number of arguments printed.
on arches that do alignment (like arm, ppc, and xtensa), the kernel does take
5 args. the fact that one of them is a dummy and thus ignored by the kernel
doesn't matter. you still have to do:
syscall(__NR_readahead,
1 /* arg1: fd */,
0 /* arg2: pad */,
0 /* arg3: off_hi */,
0 /* arg4: off_lo */,
0 /* arg5: count*/);
so i think the current definition is OK.
i think you do point out though that the value is wrong for 64bit arches -- it
should be 3:
syscall(__NR_readahead,
1 /* arg1: fd */,
0 /* arg2: off */,
0 /* arg3: count*/);
when Dmitry talked about printargs, he's referring to the the func literally
named "printargs" that dumps every syscall arg. so it's not dual definition.
-mike
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________ Strace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/strace-devel
