git: truss - Handle xsyscall syscalls better, and fix argument printing on x86_64.

Imre Vadasz ivadasz at crater.dragonflybsd.org
Tue Dec 23 09:57:34 PST 2025


commit bc3495ff3cf28b0451231b651339bdf5c4c136c4
Author: Imre Vadász <imre at vdsz.com>
Date:   Tue Dec 23 18:43:11 2025 +0100

    truss - Handle xsyscall syscalls better, and fix argument printing on x86_64.
    
    * Some further work is needed to make sure arguments are printed correctly
      for xsyscall syscalls, and to update and improve the output.
    
    * xsyscall syscalls are currently always signaled to the PIOCWAIT ioctl with
      nargs=0, because the syscall2() handler only looks up the argument count
      for the xsyscall SYSCALL (i.e. syscall(2) or __syscall(2)), which takes a
      variable argument count. So for now, we can just let truss figure out the
      argument count itself.
    
    * Argument printing code was broken on x86_64, due to wrong malloc buffer
      sizing (it only didn't segfault out of luck). Update to explicitly
      distinguish between 32bit and 64bit arguments.
    
    * Small first update on the syscall argument table maintained in truss.
    
    * Get rid of the Quad argument type printing, which is obsolete on 64bit
      systems.

Summary of changes:
 usr.bin/truss/syscall.h     | 11 +++----
 usr.bin/truss/syscalls.c    | 72 +++++++++++++++++----------------------------
 usr.bin/truss/x86_64-fbsd.c | 43 +++++++++++++++++----------
 3 files changed, 60 insertions(+), 66 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/bc3495ff3cf28b0451231b651339bdf5c4c136c4


-- 
DragonFly BSD source repository


More information about the Commits mailing list