summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss/main.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-11-09 03:48:13 +0000
committermarcel <marcel@FreeBSD.org>2003-11-09 03:48:13 +0000
commit3f532e652b08331243d297085d4f13318e94f586 (patch)
tree89caf91024722473ad91738e243659a20d561f8b /usr.bin/truss/main.c
parent9162843df044ab6081d73ed699fe186f4a6fe779 (diff)
downloadFreeBSD-src-3f532e652b08331243d297085d4f13318e94f586.zip
FreeBSD-src-3f532e652b08331243d297085d4f13318e94f586.tar.gz
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.
Diffstat (limited to 'usr.bin/truss/main.c')
-rw-r--r--usr.bin/truss/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/truss/main.c b/usr.bin/truss/main.c
index 0a6cdb5..1514820 100644
--- a/usr.bin/truss/main.c
+++ b/usr.bin/truss/main.c
@@ -79,7 +79,7 @@ usage(void)
struct ex_types {
const char *type;
void (*enter_syscall)(struct trussinfo *, int);
- int (*exit_syscall)(struct trussinfo *, int);
+ long (*exit_syscall)(struct trussinfo *, int);
} ex_types[] = {
#ifdef __alpha__
{ "FreeBSD ELF", alpha_syscall_entry, alpha_syscall_exit },
OpenPOWER on IntegriCloud