From owner-svn-src-head@freebsd.org Sat Mar 18 19:59:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 912DED12D28; Sat, 18 Mar 2017 19:59:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46ECF1936; Sat, 18 Mar 2017 19:59:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2IJxLxe008312; Sat, 18 Mar 2017 19:59:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IJxLxE008310; Sat, 18 Mar 2017 19:59:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201703181959.v2IJxLxE008310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 18 Mar 2017 19:59:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315509 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Mar 2017 19:59:22 -0000 Author: jhb Date: Sat Mar 18 19:59:21 2017 New Revision: 315509 URL: https://svnweb.freebsd.org/changeset/base/315509 Log: Decode arguments passed to kldsym() and kldunloadf(). This does not currently decode the kld_sym_lookup structure passed to kldsym(). Modified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Sat Mar 18 19:54:58 2017 (r315508) +++ head/usr.bin/truss/syscall.h Sat Mar 18 19:59:21 2017 (r315509) @@ -45,7 +45,8 @@ enum Argtype { None = 1, Hex, Octal, Int Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, - CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, + CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd, + Kldunloadflags, CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Sat Mar 18 19:54:58 2017 (r315508) +++ head/usr.bin/truss/syscalls.c Sat Mar 18 19:59:21 2017 (r315509) @@ -193,8 +193,12 @@ static struct syscall decoded_syscalls[] .args = { { Int, 0 } } }, { .name = "kldstat", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Ptr, 1 } } }, + { .name = "kldsym", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Kldsymcmd, 1 }, { Ptr, 2 } } }, { .name = "kldunload", .ret_type = 1, .nargs = 1, .args = { { Int, 0 } } }, + { .name = "kldunloadf", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Kldunloadflags, 1 } } }, { .name = "kse_release", .ret_type = 0, .nargs = 1, .args = { { Timespec, 0 } } }, { .name = "lchflags", .ret_type = 1, .nargs = 2, @@ -1893,6 +1897,13 @@ print_arg(struct syscall_args *sc, unsig print_integer_arg(sysdecode_getfsstat_mode, fp, args[sc->offset]); break; + case Kldsymcmd: + print_integer_arg(sysdecode_kldsym_cmd, fp, args[sc->offset]); + break; + case Kldunloadflags: + print_integer_arg(sysdecode_kldunload_flags, fp, + args[sc->offset]); + break; case CloudABIAdvice: fputs(xlookup(cloudabi_advice, args[sc->offset]), fp);