svn commit: r358116 - head/usr.bin/truss
Kyle Evans
kevans at FreeBSD.org
Wed Feb 19 14:54:34 UTC 2020
Author: kevans
Date: Wed Feb 19 14:54:33 2020
New Revision: 358116
URL: https://svnweb.freebsd.org/changeset/base/358116
Log:
truss: decode shm_open2
shm_open2 is similar to shm_open, except it also takes shmflags and optional
name to label the anonymous region for, e.g., debugging purposes.
The appropriate support for decoding shmflags was added to libsysdecode in
r358115.
This is a part of D23733.
Reviewed by: kaktus
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 Wed Feb 19 14:52:32 2020 (r358115)
+++ head/usr.bin/truss/syscall.h Wed Feb 19 14:54:33 2020 (r358116)
@@ -122,6 +122,7 @@ enum Argtype {
Rtpriofunc,
RusageWho,
Schedpolicy,
+ ShmFlags,
Shutdown,
Signal,
Sigprocmask,
Modified: head/usr.bin/truss/syscalls.c
==============================================================================
--- head/usr.bin/truss/syscalls.c Wed Feb 19 14:52:32 2020 (r358115)
+++ head/usr.bin/truss/syscalls.c Wed Feb 19 14:54:33 2020 (r358116)
@@ -471,6 +471,9 @@ static struct syscall decoded_syscalls[] = {
{ Ptr | IN, 3 }, { Socklent, 4 } } },
{ .name = "shm_open", .ret_type = 1, .nargs = 3,
.args = { { ShmName | IN, 0 }, { Open, 1 }, { Octal, 2 } } },
+ { .name = "shm_open2", .ret_type = 1, .nargs = 5,
+ .args = { { ShmName | IN, 0 }, { Open, 1 }, { Octal, 2 },
+ { ShmFlags, 3 }, { BinString | IN, 4 } } },
{ .name = "shm_rename", .ret_type = 1, .nargs = 3,
.args = { { Name | IN, 0 }, { Name | IN, 1 }, { Hex, 2 } } },
{ .name = "shm_unlink", .ret_type = 1, .nargs = 1,
@@ -2008,6 +2011,9 @@ print_arg(struct syscall_args *sc, unsigned long *args
break;
case Whence:
print_integer_arg(sysdecode_whence, fp, args[sc->offset]);
+ break;
+ case ShmFlags:
+ print_mask_arg(sysdecode_shmflags, fp, args[sc->offset]);
break;
case Sockdomain:
print_integer_arg(sysdecode_socketdomain, fp, args[sc->offset]);
More information about the svn-src-all
mailing list