cvs commit: src/usr.bin/truss alpha-fbsd.c extern.h i386-fbsd.c
i386-linux.c ia64-fbsd.c main.c sparc64-fbsd.c syscall.h
syscalls.c
Marcel Moolenaar
marcel at FreeBSD.org
Sat Nov 8 19:48:15 PST 2003
marcel 2003/11/08 19:48:13 PST
FreeBSD src repository
Modified files:
usr.bin/truss alpha-fbsd.c extern.h i386-fbsd.c
i386-linux.c ia64-fbsd.c main.c
sparc64-fbsd.c syscall.h syscalls.c
Log:
Port truss(1) to 64-bit architectures:
o Syscall return values do not fit in int on 64-bit architectures.
Change the type of retval in <arch>_syscall_exit() to long and
change the prototype of said function to return a long as well.
o Change the prototype of print_syscall_ret() to take a long for
the return address and change the format string accordingly.
o Replace the code sequence
tmp = malloc(X);
sprintf(tmp, format, ...);
with X by definition too small on 64-bit platforms by
asprintf(&tmp, format, ...);
With these changes the output makes sense again, although it does
mess up the tabulation on ia64. Go widescreen...
Not tested on: alpha, sparc64.
Revision Changes Path
1.16 +9 -12 src/usr.bin/truss/alpha-fbsd.c
1.6 +5 -5 src/usr.bin/truss/extern.h
1.20 +9 -12 src/usr.bin/truss/i386-fbsd.c
1.21 +9 -12 src/usr.bin/truss/i386-linux.c
1.5 +9 -12 src/usr.bin/truss/ia64-fbsd.c
1.35 +1 -1 src/usr.bin/truss/main.c
1.5 +7 -11 src/usr.bin/truss/sparc64-fbsd.c
1.11 +2 -1 src/usr.bin/truss/syscall.h
1.32 +15 -23 src/usr.bin/truss/syscalls.c
More information about the cvs-src
mailing list