Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Feb 2010 12:51:15 +0530
From:      "C. Jayachandran" <c.jayachandran@gmail.com>
To:        freebsd-mips@freebsd.org
Subject:   truss - minor fix for mips
Message-ID:  <98a59be81002022321w510e7b6eoed2f28f46bfb2740@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?98a59be81002022321w510e7b6eoed2f28f46bfb2740>