diff options
author | marcel <marcel@FreeBSD.org> | 2007-07-28 23:15:04 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2007-07-28 23:15:04 +0000 |
commit | aa233d32b1e7dc57144bc67c340f3c52c982328b (patch) | |
tree | 321b250e205daf0306e621989b97304217f90226 /usr.bin/truss/amd64-fbsd32.c | |
parent | 03338701312c15220e1e66fcb969bd95cdfeb54c (diff) | |
download | FreeBSD-src-aa233d32b1e7dc57144bc67c340f3c52c982328b.zip FreeBSD-src-aa233d32b1e7dc57144bc67c340f3c52c982328b.tar.gz |
Fix handling of Quad-type arguments. Previously, syscalls
containing 64-bit arguments would have explicit padding.
On 64-bit platforms there was no padding, so the dummy
argument was not covering anything. On 32-bit platforms
with weak alignment (i.e. i386) the 64-bit argument did
not need to be aligned, so there too an aditional argument
was introduced. On 32-bit platforms with strong alignment
(i.e. PowerPC) the dummy argument in fact cover the padding.
By elimininating the dummy argument, 64-bit platforms now
have 1 argument less. This also applies to 32-bit platforms
with weak alignment. On PowerPC this doesn't matter, because
the padding is still there. We just don't "name" it.
Deal with those 3 cases.
Approved by: re (kensmith)
Diffstat (limited to 'usr.bin/truss/amd64-fbsd32.c')
-rw-r--r-- | usr.bin/truss/amd64-fbsd32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/truss/amd64-fbsd32.c b/usr.bin/truss/amd64-fbsd32.c index 6abd99f..4f0eabb 100644 --- a/usr.bin/truss/amd64-fbsd32.c +++ b/usr.bin/truss/amd64-fbsd32.c @@ -167,7 +167,7 @@ i386_syscall_entry(struct trussinfo *trussinfo, int nargs) { iorequest.piod_op = PIOD_READ_D; iorequest.piod_offs = (void *)parm_offset; iorequest.piod_addr = fsc.args; - iorequest.piod_len = nargs * sizeof(unsigned long); + iorequest.piod_len = (1+nargs) * sizeof(unsigned long); ptrace(PT_IO, cpid, (caddr_t)&iorequest, 0); if (iorequest.piod_len == 0) return; |