From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 07:21:16 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FDB11065672 for ; Wed, 3 Feb 2010 07:21:16 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-pz0-f202.google.com (mail-pz0-f202.google.com [209.85.222.202]) by mx1.freebsd.org (Postfix) with ESMTP id 2C2E98FC1B for ; Wed, 3 Feb 2010 07:21:15 +0000 (UTC) Received: by pzk40 with SMTP id 40so1074705pzk.7 for ; Tue, 02 Feb 2010 23:21:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=ovAw4qWJ6y2/g0mnW2dhv/4qpTghca5Gs8h12pfXTs4=; b=ZcP0gLLXAiQQ9cefwYOXy7CLCDDRBzzj5t3+5DRBM1qeZYMuypUX5pa8jbIPzpvlSU 62KK73d86FqTsmirN4T6fMsWCb23C76Z6D7J+7dr0RN+qFqHGtrR0GMR+4WxykZhVgMc CK4D0giYKnul5LS/1Sq2ryxXiksywAdM9Upww= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=mWg88n4kvh+OEmdznJ1vheUl44jFY+XDDOOEL4scgIUz6FWL5cQ7DIPTWb9RxYFMNR jbPIJ0rUmUYq1UzoeB02V9/N8K+oITqe08BAKQ+htvzMmnt8ULFEq0D4nD1Vt/1EmzZd 9pOfOvy9Y/fsBtWyeFp/osLjJZjmmSxLGSQck= MIME-Version: 1.0 Received: by 10.141.2.14 with SMTP id e14mr4971687rvi.56.1265181675676; Tue, 02 Feb 2010 23:21:15 -0800 (PST) Date: Wed, 3 Feb 2010 12:51:15 +0530 Message-ID: <98a59be81002022321w510e7b6eoed2f28f46bfb2740@mail.gmail.com> From: "C. Jayachandran" To: freebsd-mips@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: Subject: truss - minor fix for mips X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 07:21:16 -0000 The current truss crashes even after the ptrace fix (I'd mailed earlier) is applied. The fsc.args needs to be allocated before it can be filled from the registers. The following patch will fix that. Truss output still seems to have issues (too many sigprocmask calls, no tracing shown for static executables) which I am looking at - but the change below seems to be needed. Comments welcome, JC. Index: usr.bin/truss/mips-fbsd.c =================================================================== --- usr.bin/truss/mips-fbsd.c (revision 203379) +++ usr.bin/truss/mips-fbsd.c (working copy) @@ -155,8 +155,8 @@ if (nargs == 0) return; + fsc.args = malloc((1+nargs) * sizeof(unsigned long)); #if 0 // XXX - fsc.args = malloc((1+nargs) * sizeof(unsigned long)); iorequest.piod_op = PIOD_READ_D; iorequest.piod_offs = (void *)parm_offset; iorequest.piod_addr = fsc.args;