truss says null()

Terry Lambert tlambert2 at mindspring.com
Tue Jul 15 01:52:41 PDT 2003


Daniel Eischen wrote:
> On Tue, 15 Jul 2003, Kai Mosebach wrote:
> > (null)()                                         = 383 (0x17f)
> 
> I don't know what the (null)'s are.  What does
> ktrace show?

The normal cause of this is a system call has been added, and truss
was not updated.  It needs to be given the names of the system calls
for it to be able to display them.  It could probably be a little
more graceful about it, and cons up a name, instead, when it gets
stale relative to the system (I have attached the patch I use
locally for this, if you want to commit something like it; it's
probably more proper to increase the number of arguments by one
and shift them all, and change the name of the system call to
"syscall", rather than do it this way, but it's enough to pass you
the information you need).

Note that applying this patch and recompiling will make applying
this patch unnecessary.  8-).  But if you commit it (or the "right"
one, described above), it will be there for the next person who has
the same problem.

If you don't care about that, then just go to /usr/src/usr.bin/truss
and "make clean all install".

-- Terry
-------------- next part --------------
225,231c225
<     if (fsc.name == NULL) {
<       static char xbuf[20];
<       snprintf(buf, sizeof(xbuf), "syscall(%d)", fsc.number);
<       print_syscall(outfile, xbuf, fsc.nargs, fsc.s_args);
<     } else {
<       print_syscall(outfile, fsc.name, fsc.nargs, fsc.s_args);
<     }
---
>     print_syscall(outfile, fsc.name, fsc.nargs, fsc.s_args);


More information about the freebsd-threads mailing list