git: truss - Fix xsyscall printing of 6th argument. Fix lseek arguments.

Imre Vadasz ivadasz at crater.dragonflybsd.org
Thu Dec 25 11:22:04 PST 2025


commit e1d4ba6cdf29eb77b8d42e67fcb0e17f9d8fb19d
Author: Imre Vadász <imre at vdsz.com>
Date:   Thu Dec 25 19:45:22 2025 +0100

    truss - Fix xsyscall printing of 6th argument. Fix lseek arguments.
    
    * The 6th argument of an xsyscall gets buried underneath one extra stack
      value, so we need to add 2*sizeof(register_t) to the RSP register value.
    
    * The 3rd argument of lseek(2) gets passed in the place where the 4th
      argument is expected.
    
    * Add "execve" to the list in syscalls.c, in order to print the path string.
      Explicitly specify the number of return values as 0, and print a newline
      after printing the Syscall Entry information in that case.
      This does the right thing, since "execve" only returns a value when it
      fails, and errors are handled separately in truss(1).
    
    * At least for very basic programs, truss(1) should now be somewhat useable
      again, but a lot remains to make it great again.

Summary of changes:
 usr.bin/truss/syscalls.c    |  6 ++++--
 usr.bin/truss/x86_64-fbsd.c | 11 +++++++----
 2 files changed, 11 insertions(+), 6 deletions(-)

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


-- 
DragonFly BSD source repository


More information about the Commits mailing list