From owner-cvs-all@FreeBSD.ORG Sat Nov 8 19:48:15 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F40A816A4CE; Sat, 8 Nov 2003 19:48:14 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 730F043FA3; Sat, 8 Nov 2003 19:48:14 -0800 (PST) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hA93mEXJ040789; Sat, 8 Nov 2003 19:48:14 -0800 (PST) (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hA93mEJ1040788; Sat, 8 Nov 2003 19:48:14 -0800 (PST) (envelope-from marcel) Message-Id: <200311090348.hA93mEJ1040788@repoman.freebsd.org> From: Marcel Moolenaar Date: Sat, 8 Nov 2003 19:48:13 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: 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 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2003 03:48:15 -0000 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 _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