qemu-e2k/linux-user/strace.list

1668 lines
52 KiB
Plaintext
Raw Normal View History

/*
* Note that if you change format strings in these, check also
* that corresponding print functions are able to handle string
* locking correctly (see strace.c).
*/
#ifdef TARGET_NR_accept
{ TARGET_NR_accept, "accept" , NULL, print_accept, NULL },
#endif
#ifdef TARGET_NR_accept4
{ TARGET_NR_accept4, "accept4" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_access
{ TARGET_NR_access, "access" , NULL, print_access, NULL },
#endif
#ifdef TARGET_NR_acct
{ TARGET_NR_acct, "acct" , NULL, print_acct, NULL },
#endif
#ifdef TARGET_NR_add_key
{ TARGET_NR_add_key, "add_key" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_adjtimex
{ TARGET_NR_adjtimex, "adjtimex" , "%s(%p)", NULL,
print_syscall_ret_adjtimex },
#endif
#ifdef TARGET_NR_afs_syscall
{ TARGET_NR_afs_syscall, "afs_syscall" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_alarm
{ TARGET_NR_alarm, "alarm" , "%s(%u)", NULL, NULL },
#endif
#ifdef TARGET_NR_aplib
{ TARGET_NR_aplib, "aplib" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_arch_prctl
{ TARGET_NR_arch_prctl, "arch_prctl" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_arm_fadvise64_64
{ TARGET_NR_arm_fadvise64_64, "arm_fadvise64_64" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_bdflush
{ TARGET_NR_bdflush, "bdflush" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_bind
{ TARGET_NR_bind, "bind" , NULL, print_bind, NULL },
#endif
#ifdef TARGET_NR_bpf
{ TARGET_NR_bpf, "bpf" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_break
{ TARGET_NR_break, "break" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_brk
{ TARGET_NR_brk, "brk" , NULL, print_brk, print_syscall_ret_addr },
#endif
#ifdef TARGET_NR_cachectl
{ TARGET_NR_cachectl, "cachectl" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_cacheflush
{ TARGET_NR_cacheflush, "cacheflush" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_capget
{ TARGET_NR_capget, "capget" , "%s(%p,%p)", NULL, NULL },
#endif
#ifdef TARGET_NR_capset
{ TARGET_NR_capset, "capset" , "%s(%p,%p)", NULL, NULL },
#endif
#ifdef TARGET_NR_chdir
{ TARGET_NR_chdir, "chdir" , NULL, print_chdir, NULL },
#endif
#ifdef TARGET_NR_chmod
{ TARGET_NR_chmod, "chmod" , NULL, print_chmod, NULL },
#endif
#ifdef TARGET_NR_chown
{ TARGET_NR_chown, "chown" , NULL, print_chown, NULL },
#endif
#ifdef TARGET_NR_chown32
{ TARGET_NR_chown32, "chown32" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_chroot
{ TARGET_NR_chroot, "chroot" , NULL, print_chroot, NULL },
#endif
#ifdef TARGET_NR_clock_adjtime
{ TARGET_NR_clock_adjtime, "clock_adjtime" , NULL, print_clock_adjtime, NULL },
#endif
#ifdef TARGET_NR_clock_getres
linux-user: Add strace support for printing arguments of some clock and time functions This patch implements strace argument printing functionality for following syscalls: * clock_getres, clock_gettime, clock_settime - clock and time functions int clock_getres(clockid_t clockid, struct timespec *res) int clock_gettime(clockid_t clockid, struct timespec *tp) int clock_settime(clockid_t clockid, const struct timespec *tp) man page: https://man7.org/linux/man-pages/man2/clock_getres.2.html * gettimeofday - get time int gettimeofday(struct timeval *tv, struct timezone *tz) man page: https://man7.org/linux/man-pages/man2/gettimeofday.2.html * getitimer, setitimer - get or set value of an interval timer int getitimer(int which, struct itimerval *curr_value) int setitimer(int which, const struct itimerval *new_value, struct itimerval *old_value) man page: https://man7.org/linux/man-pages/man2/getitimer.2.html Implementation notes: All of the syscalls have some structue types as argument types and thus a separate printing function was stated in file "strace.list" for each of them. All of these functions use existing functions for their appropriate structure types ("print_timeval()" and "print_timezone()"). Functions "print_timespec()" and "print_itimerval()" were added in this patch so that they can be used to print types "struct timespec" and "struct itimerval" used by some of the syscalls. Function "print_itimerval()" uses the existing function "print_timeval()" to print fields of the structure "struct itimerval" that are of type "struct timeval". Function "print_enums()", which was introduced in the previous patch, is used to print the interval timer type which is the first argument of "getitimer()" and "setitimer()". Also, this function is used to print the clock id which is the first argument of "clock_getres()" and "clock_gettime()". For that reason, the existing function "print_clockid()" was removed in this patch. Existing function "print_clock_adjtime()" was also changed for this reason to use "print_enums()". The existing function "print_timeval()" was changed a little so that it prints the field names beside the values. Syscalls "clock_getres()" and "clock_gettime()" have the same number and types of arguments and thus their print functions "print_clock_getres" and "print_clock_gettime" share a common definition in file "strace.c". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200811164553.27713-6-Filip.Bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-11 18:45:53 +02:00
{ TARGET_NR_clock_getres, "clock_getres" , NULL, print_clock_getres,
print_syscall_ret_clock_getres },
#endif
#ifdef TARGET_NR_clock_gettime
linux-user: Add strace support for printing arguments of some clock and time functions This patch implements strace argument printing functionality for following syscalls: * clock_getres, clock_gettime, clock_settime - clock and time functions int clock_getres(clockid_t clockid, struct timespec *res) int clock_gettime(clockid_t clockid, struct timespec *tp) int clock_settime(clockid_t clockid, const struct timespec *tp) man page: https://man7.org/linux/man-pages/man2/clock_getres.2.html * gettimeofday - get time int gettimeofday(struct timeval *tv, struct timezone *tz) man page: https://man7.org/linux/man-pages/man2/gettimeofday.2.html * getitimer, setitimer - get or set value of an interval timer int getitimer(int which, struct itimerval *curr_value) int setitimer(int which, const struct itimerval *new_value, struct itimerval *old_value) man page: https://man7.org/linux/man-pages/man2/getitimer.2.html Implementation notes: All of the syscalls have some structue types as argument types and thus a separate printing function was stated in file "strace.list" for each of them. All of these functions use existing functions for their appropriate structure types ("print_timeval()" and "print_timezone()"). Functions "print_timespec()" and "print_itimerval()" were added in this patch so that they can be used to print types "struct timespec" and "struct itimerval" used by some of the syscalls. Function "print_itimerval()" uses the existing function "print_timeval()" to print fields of the structure "struct itimerval" that are of type "struct timeval". Function "print_enums()", which was introduced in the previous patch, is used to print the interval timer type which is the first argument of "getitimer()" and "setitimer()". Also, this function is used to print the clock id which is the first argument of "clock_getres()" and "clock_gettime()". For that reason, the existing function "print_clockid()" was removed in this patch. Existing function "print_clock_adjtime()" was also changed for this reason to use "print_enums()". The existing function "print_timeval()" was changed a little so that it prints the field names beside the values. Syscalls "clock_getres()" and "clock_gettime()" have the same number and types of arguments and thus their print functions "print_clock_getres" and "print_clock_gettime" share a common definition in file "strace.c". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200811164553.27713-6-Filip.Bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-11 18:45:53 +02:00
{ TARGET_NR_clock_gettime, "clock_gettime" , NULL, print_clock_gettime,
print_syscall_ret_clock_gettime },
#endif
#ifdef TARGET_NR_clock_nanosleep
{ TARGET_NR_clock_nanosleep, "clock_nanosleep" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_clock_settime
linux-user: Add strace support for printing arguments of some clock and time functions This patch implements strace argument printing functionality for following syscalls: * clock_getres, clock_gettime, clock_settime - clock and time functions int clock_getres(clockid_t clockid, struct timespec *res) int clock_gettime(clockid_t clockid, struct timespec *tp) int clock_settime(clockid_t clockid, const struct timespec *tp) man page: https://man7.org/linux/man-pages/man2/clock_getres.2.html * gettimeofday - get time int gettimeofday(struct timeval *tv, struct timezone *tz) man page: https://man7.org/linux/man-pages/man2/gettimeofday.2.html * getitimer, setitimer - get or set value of an interval timer int getitimer(int which, struct itimerval *curr_value) int setitimer(int which, const struct itimerval *new_value, struct itimerval *old_value) man page: https://man7.org/linux/man-pages/man2/getitimer.2.html Implementation notes: All of the syscalls have some structue types as argument types and thus a separate printing function was stated in file "strace.list" for each of them. All of these functions use existing functions for their appropriate structure types ("print_timeval()" and "print_timezone()"). Functions "print_timespec()" and "print_itimerval()" were added in this patch so that they can be used to print types "struct timespec" and "struct itimerval" used by some of the syscalls. Function "print_itimerval()" uses the existing function "print_timeval()" to print fields of the structure "struct itimerval" that are of type "struct timeval". Function "print_enums()", which was introduced in the previous patch, is used to print the interval timer type which is the first argument of "getitimer()" and "setitimer()". Also, this function is used to print the clock id which is the first argument of "clock_getres()" and "clock_gettime()". For that reason, the existing function "print_clockid()" was removed in this patch. Existing function "print_clock_adjtime()" was also changed for this reason to use "print_enums()". The existing function "print_timeval()" was changed a little so that it prints the field names beside the values. Syscalls "clock_getres()" and "clock_gettime()" have the same number and types of arguments and thus their print functions "print_clock_getres" and "print_clock_gettime" share a common definition in file "strace.c". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200811164553.27713-6-Filip.Bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-11 18:45:53 +02:00
{ TARGET_NR_clock_settime, "clock_settime" , NULL, print_clock_settime, NULL },
#endif
#ifdef TARGET_NR_clone
{ TARGET_NR_clone, "clone" , NULL, print_clone, NULL },
#endif
#ifdef TARGET_NR_close
{ TARGET_NR_close, "close" , "%s(%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_connect
{ TARGET_NR_connect, "connect" , "%s(%d,%#x,%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_creat
{ TARGET_NR_creat, "creat" , NULL, print_creat, NULL },
#endif
#ifdef TARGET_NR_create_module
{ TARGET_NR_create_module, "create_module" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_delete_module
{ TARGET_NR_delete_module, "delete_module" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_dipc
{ TARGET_NR_dipc, "dipc" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_dup
{ TARGET_NR_dup, "dup" , "%s(%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_dup2
{ TARGET_NR_dup2, "dup2" , "%s(%d,%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_dup3
{ TARGET_NR_dup3, "dup3" , "%s(%d,%d,%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_epoll_create
{ TARGET_NR_epoll_create, "epoll_create", "%s(%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_epoll_create1
{ TARGET_NR_epoll_create1, "epoll_create1", "%s(%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_epoll_ctl
{ TARGET_NR_epoll_ctl, "epoll_ctl" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_epoll_ctl_old
{ TARGET_NR_epoll_ctl_old, "epoll_ctl_old" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_epoll_pwait
{ TARGET_NR_epoll_pwait, "epoll_pwait" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_epoll_wait
{ TARGET_NR_epoll_wait, "epoll_wait" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_epoll_wait_old
{ TARGET_NR_epoll_wait_old, "epoll_wait_old" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_eventfd
{ TARGET_NR_eventfd, "eventfd", "%s(%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_eventfd2
{ TARGET_NR_eventfd2, "eventfd2" , "%s(%d,%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_execv
{ TARGET_NR_execv, "execv" , NULL, print_execv, NULL },
#endif
#ifdef TARGET_NR_execve
{ TARGET_NR_execve, "execve" , NULL, print_execve, NULL },
#endif
#ifdef TARGET_NR_execveat
{ TARGET_NR_execveat, "execveat" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_exec_with_loader
{ TARGET_NR_exec_with_loader, "exec_with_loader" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_exit
{ TARGET_NR_exit, "exit" , "%s(%d)\n", NULL, NULL },
#endif
#ifdef TARGET_NR__exit
{ TARGET_NR__exit, "_exit" , "%s(%d)\n", NULL, NULL },
#endif
#ifdef TARGET_NR_exit_group
{ TARGET_NR_exit_group, "exit_group" , "%s(%d)\n", NULL, NULL },
#endif
#ifdef TARGET_NR_faccessat
{ TARGET_NR_faccessat, "faccessat" , NULL, print_faccessat, NULL },
#endif
#ifdef TARGET_NR_fadvise64
{ TARGET_NR_fadvise64, "fadvise64" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_fadvise64_64
{ TARGET_NR_fadvise64_64, "fadvise64_64" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_fallocate
2020-06-19 14:33:31 +02:00
{ TARGET_NR_fallocate, "fallocate" , NULL, print_fallocate, NULL },
#endif
#ifdef TARGET_NR_fanotify_init
{ TARGET_NR_fanotify_init, "fanotify_init" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_fanotify_mark
{ TARGET_NR_fanotify_mark, "fanotify_mark" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_fchdir
{ TARGET_NR_fchdir, "fchdir" , "%s(%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_fchmod
{ TARGET_NR_fchmod, "fchmod" , "%s(%d,%#o)", NULL, NULL },
#endif
#ifdef TARGET_NR_fchmodat
{ TARGET_NR_fchmodat, "fchmodat" , NULL, print_fchmodat, NULL },
#endif
#ifdef TARGET_NR_fchown
{ TARGET_NR_fchown, "fchown" , "%s(%d,%d,%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_fchown32
{ TARGET_NR_fchown32, "fchown32" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_fchownat
{ TARGET_NR_fchownat, "fchownat" , NULL, print_fchownat, NULL },
#endif
#ifdef TARGET_NR_fcntl
{ TARGET_NR_fcntl, "fcntl" , NULL, print_fcntl, NULL },
#endif
#ifdef TARGET_NR_fcntl64
{ TARGET_NR_fcntl64, "fcntl64" , NULL, print_fcntl64, NULL },
#endif
#ifdef TARGET_NR_fdatasync
{ TARGET_NR_fdatasync, "fdatasync" , "%s(%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_fgetxattr
linux-user: Add strace support for printing argument of syscalls used for extended attributes This patch implements strace argument printing functionality for following syscalls: *getxattr, lgetxattr, fgetxattr - retrieve an extended attribute value ssize_t getxattr(const char *path, const char *name, void *value, size_t size) ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size) ssize_t fgetxattr(int fd, const char *name, void *value, size_t size) man page: https://www.man7.org/linux/man-pages/man2/getxattr.2.html *listxattr, llistxattr, flistxattr - list extended attribute names ssize_t listxattr(const char *path, char *list, size_t size) ssize_t llistxattr(const char *path, char *list, size_t size) ssize_t flistxattr(int fd, char *list, size_t size) man page: https://www.man7.org/linux/man-pages/man2/listxattr.2.html *removexattr, lremovexattr, fremovexattr - remove an extended attribute int removexattr(const char *path, const char *name) int lremovexattr(const char *path, const char *name) int fremovexattr(int fd, const char *name) man page: https://www.man7.org/linux/man-pages/man2/removexattr.2.html Implementation notes: All of the syscalls have strings as argument types and thus a separate printing function was stated in file "strace.list" for every one of them. All of these printing functions were defined in "strace.c" using existing printing functions for appropriate argument types: "print_string()" - for (const char*) type "print_pointer()" - for (char*) and (void *) type "print_raw_param()" for (int) and (size_t) type Syscalls "getxattr()" and "lgetxattr()" have the same number and type of arguments and thus their print functions ("print_getxattr", "print_lgetxattr") share a same definition. The same statement applies to syscalls "listxattr()" and "llistxattr()". Function "print_syscall_ret_listxattr()" was added to print the returned list of extended attributes for syscalls "print_listxattr(), print_llistxattr() and print_flistxattr()". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200619123331.17387-4-filip.bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-06-19 14:33:28 +02:00
{ TARGET_NR_fgetxattr, "fgetxattr" , NULL, print_fgetxattr, NULL },
#endif
#ifdef TARGET_NR_finit_module
{ TARGET_NR_finit_module, "finit_module" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_flistxattr
linux-user: Add strace support for printing argument of syscalls used for extended attributes This patch implements strace argument printing functionality for following syscalls: *getxattr, lgetxattr, fgetxattr - retrieve an extended attribute value ssize_t getxattr(const char *path, const char *name, void *value, size_t size) ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size) ssize_t fgetxattr(int fd, const char *name, void *value, size_t size) man page: https://www.man7.org/linux/man-pages/man2/getxattr.2.html *listxattr, llistxattr, flistxattr - list extended attribute names ssize_t listxattr(const char *path, char *list, size_t size) ssize_t llistxattr(const char *path, char *list, size_t size) ssize_t flistxattr(int fd, char *list, size_t size) man page: https://www.man7.org/linux/man-pages/man2/listxattr.2.html *removexattr, lremovexattr, fremovexattr - remove an extended attribute int removexattr(const char *path, const char *name) int lremovexattr(const char *path, const char *name) int fremovexattr(int fd, const char *name) man page: https://www.man7.org/linux/man-pages/man2/removexattr.2.html Implementation notes: All of the syscalls have strings as argument types and thus a separate printing function was stated in file "strace.list" for every one of them. All of these printing functions were defined in "strace.c" using existing printing functions for appropriate argument types: "print_string()" - for (const char*) type "print_pointer()" - for (char*) and (void *) type "print_raw_param()" for (int) and (size_t) type Syscalls "getxattr()" and "lgetxattr()" have the same number and type of arguments and thus their print functions ("print_getxattr", "print_lgetxattr") share a same definition. The same statement applies to syscalls "listxattr()" and "llistxattr()". Function "print_syscall_ret_listxattr()" was added to print the returned list of extended attributes for syscalls "print_listxattr(), print_llistxattr() and print_flistxattr()". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200619123331.17387-4-filip.bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-06-19 14:33:28 +02:00
{ TARGET_NR_flistxattr, "flistxattr" , NULL, print_flistxattr,
print_syscall_ret_flistxattr},
#endif
#ifdef TARGET_NR_flock
{ TARGET_NR_flock, "flock" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_fork
{ TARGET_NR_fork, "fork" , "%s()", NULL, NULL },
#endif
#ifdef TARGET_NR_fremovexattr
linux-user: Add strace support for printing argument of syscalls used for extended attributes This patch implements strace argument printing functionality for following syscalls: *getxattr, lgetxattr, fgetxattr - retrieve an extended attribute value ssize_t getxattr(const char *path, const char *name, void *value, size_t size) ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size) ssize_t fgetxattr(int fd, const char *name, void *value, size_t size) man page: https://www.man7.org/linux/man-pages/man2/getxattr.2.html *listxattr, llistxattr, flistxattr - list extended attribute names ssize_t listxattr(const char *path, char *list, size_t size) ssize_t llistxattr(const char *path, char *list, size_t size) ssize_t flistxattr(int fd, char *list, size_t size) man page: https://www.man7.org/linux/man-pages/man2/listxattr.2.html *removexattr, lremovexattr, fremovexattr - remove an extended attribute int removexattr(const char *path, const char *name) int lremovexattr(const char *path, const char *name) int fremovexattr(int fd, const char *name) man page: https://www.man7.org/linux/man-pages/man2/removexattr.2.html Implementation notes: All of the syscalls have strings as argument types and thus a separate printing function was stated in file "strace.list" for every one of them. All of these printing functions were defined in "strace.c" using existing printing functions for appropriate argument types: "print_string()" - for (const char*) type "print_pointer()" - for (char*) and (void *) type "print_raw_param()" for (int) and (size_t) type Syscalls "getxattr()" and "lgetxattr()" have the same number and type of arguments and thus their print functions ("print_getxattr", "print_lgetxattr") share a same definition. The same statement applies to syscalls "listxattr()" and "llistxattr()". Function "print_syscall_ret_listxattr()" was added to print the returned list of extended attributes for syscalls "print_listxattr(), print_llistxattr() and print_flistxattr()". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200619123331.17387-4-filip.bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-06-19 14:33:28 +02:00
{ TARGET_NR_fremovexattr, "fremovexattr" , NULL, print_fremovexattr, NULL },
#endif
#ifdef TARGET_NR_fsetxattr
{ TARGET_NR_fsetxattr, "fsetxattr" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_fstat
{ TARGET_NR_fstat, "fstat" , NULL, print_fstat, NULL },
#endif
#ifdef TARGET_NR_fstat64
{ TARGET_NR_fstat64, "fstat64" , NULL, print_fstat64, NULL },
#endif
#ifdef TARGET_NR_fstatfs
{ TARGET_NR_fstatfs, "fstatfs" , "%s(%d,%p)", NULL, NULL },
#endif
#ifdef TARGET_NR_fstatfs64
{ TARGET_NR_fstatfs64, "fstatfs64" , "%s(%d,%p)", NULL, NULL },
#endif
#ifdef TARGET_NR_fsync
{ TARGET_NR_fsync, "fsync" , "%s(%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_ftime
{ TARGET_NR_ftime, "ftime" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_ftruncate
linux-user: Add strace support for printing arguments of truncate()/ftruncate() and getsid() This patch implements strace argument printing functionality for following syscalls: * truncate, ftruncate - truncate a file to a specified length int truncate/truncate64(const char *path, off_t length) int ftruncate/ftruncate64(int fd, off_t length) man page: https://man7.org/linux/man-pages/man2/truncate.2.html * getsid - get session ID pid_t getsid(pid_t pid) man page: https://man7.org/linux/man-pages/man2/getsid.2.html Implementation notes: Syscalls truncate/truncate64 take string argument types and thus a separate print function "print_truncate/print_truncate64" is stated in file "strace.list". This function is defined and implemented in "strace.c" by using an existing function used to print string arguments: "print_string()". For syscall ftruncate64, a separate printing function was also stated in "strace.c" as it requires a special kind of handling. The other syscalls have only primitive argument types, so the rest of the implementation was handled by stating an appropriate printing format in file "strace.list". Function "regpairs_aligned()" was cut & pasted from "syscall.c" to "qemu.h" as it is used by functions "print_truncate64()" and "print_ftruncate64()" to print the offset arguments of "truncate64()" and "ftruncate64()". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200811164553.27713-3-Filip.Bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-11 18:45:50 +02:00
{ TARGET_NR_ftruncate, "ftruncate" , "%s(%d," TARGET_ABI_FMT_ld ")", NULL, NULL },
#endif
#ifdef TARGET_NR_ftruncate64
linux-user: Add strace support for printing arguments of truncate()/ftruncate() and getsid() This patch implements strace argument printing functionality for following syscalls: * truncate, ftruncate - truncate a file to a specified length int truncate/truncate64(const char *path, off_t length) int ftruncate/ftruncate64(int fd, off_t length) man page: https://man7.org/linux/man-pages/man2/truncate.2.html * getsid - get session ID pid_t getsid(pid_t pid) man page: https://man7.org/linux/man-pages/man2/getsid.2.html Implementation notes: Syscalls truncate/truncate64 take string argument types and thus a separate print function "print_truncate/print_truncate64" is stated in file "strace.list". This function is defined and implemented in "strace.c" by using an existing function used to print string arguments: "print_string()". For syscall ftruncate64, a separate printing function was also stated in "strace.c" as it requires a special kind of handling. The other syscalls have only primitive argument types, so the rest of the implementation was handled by stating an appropriate printing format in file "strace.list". Function "regpairs_aligned()" was cut & pasted from "syscall.c" to "qemu.h" as it is used by functions "print_truncate64()" and "print_ftruncate64()" to print the offset arguments of "truncate64()" and "ftruncate64()". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200811164553.27713-3-Filip.Bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-11 18:45:50 +02:00
{ TARGET_NR_ftruncate64, "ftruncate64" , NULL, print_ftruncate64, NULL },
#endif
#ifdef TARGET_NR_futex
{ TARGET_NR_futex, "futex" , NULL, print_futex, NULL },
#endif
#ifdef TARGET_NR_futimesat
{ TARGET_NR_futimesat, "futimesat" , NULL, print_futimesat, NULL },
#endif
#ifdef TARGET_NR_getcpu
{ TARGET_NR_getcpu, "getcpu" , "%s(%p,%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_getcwd
{ TARGET_NR_getcwd, "getcwd" , "%s(%p,%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_getdents
{ TARGET_NR_getdents, "getdents" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getdents64
{ TARGET_NR_getdents64, "getdents64" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getdomainname
{ TARGET_NR_getdomainname, "getdomainname" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getdtablesize
{ TARGET_NR_getdtablesize, "getdtablesize" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getegid
{ TARGET_NR_getegid, "getegid" , "%s()", NULL, NULL },
#endif
#ifdef TARGET_NR_getegid32
{ TARGET_NR_getegid32, "getegid32" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_geteuid
{ TARGET_NR_geteuid, "geteuid" , "%s()", NULL, NULL },
#endif
#ifdef TARGET_NR_geteuid32
{ TARGET_NR_geteuid32, "geteuid32" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getgid
{ TARGET_NR_getgid, "getgid" , "%s()", NULL, NULL },
#endif
#ifdef TARGET_NR_getgid32
{ TARGET_NR_getgid32, "getgid32" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getgroups
{ TARGET_NR_getgroups, "getgroups" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getgroups32
{ TARGET_NR_getgroups32, "getgroups32" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_gethostname
{ TARGET_NR_gethostname, "gethostname" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getitimer
linux-user: Add strace support for printing arguments of some clock and time functions This patch implements strace argument printing functionality for following syscalls: * clock_getres, clock_gettime, clock_settime - clock and time functions int clock_getres(clockid_t clockid, struct timespec *res) int clock_gettime(clockid_t clockid, struct timespec *tp) int clock_settime(clockid_t clockid, const struct timespec *tp) man page: https://man7.org/linux/man-pages/man2/clock_getres.2.html * gettimeofday - get time int gettimeofday(struct timeval *tv, struct timezone *tz) man page: https://man7.org/linux/man-pages/man2/gettimeofday.2.html * getitimer, setitimer - get or set value of an interval timer int getitimer(int which, struct itimerval *curr_value) int setitimer(int which, const struct itimerval *new_value, struct itimerval *old_value) man page: https://man7.org/linux/man-pages/man2/getitimer.2.html Implementation notes: All of the syscalls have some structue types as argument types and thus a separate printing function was stated in file "strace.list" for each of them. All of these functions use existing functions for their appropriate structure types ("print_timeval()" and "print_timezone()"). Functions "print_timespec()" and "print_itimerval()" were added in this patch so that they can be used to print types "struct timespec" and "struct itimerval" used by some of the syscalls. Function "print_itimerval()" uses the existing function "print_timeval()" to print fields of the structure "struct itimerval" that are of type "struct timeval". Function "print_enums()", which was introduced in the previous patch, is used to print the interval timer type which is the first argument of "getitimer()" and "setitimer()". Also, this function is used to print the clock id which is the first argument of "clock_getres()" and "clock_gettime()". For that reason, the existing function "print_clockid()" was removed in this patch. Existing function "print_clock_adjtime()" was also changed for this reason to use "print_enums()". The existing function "print_timeval()" was changed a little so that it prints the field names beside the values. Syscalls "clock_getres()" and "clock_gettime()" have the same number and types of arguments and thus their print functions "print_clock_getres" and "print_clock_gettime" share a common definition in file "strace.c". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200811164553.27713-6-Filip.Bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-11 18:45:53 +02:00
{ TARGET_NR_getitimer, "getitimer" , NULL, print_getitimer,
print_syscall_ret_getitimer },
#endif
#ifdef TARGET_NR_get_kernel_syms
{ TARGET_NR_get_kernel_syms, "get_kernel_syms" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_get_mempolicy
{ TARGET_NR_get_mempolicy, "get_mempolicy" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getpagesize
{ TARGET_NR_getpagesize, "getpagesize" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getpeername
{ TARGET_NR_getpeername, "getpeername" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getpgid
{ TARGET_NR_getpgid, "getpgid" , "%s(%u)", NULL, NULL },
#endif
#ifdef TARGET_NR_getpgrp
{ TARGET_NR_getpgrp, "getpgrp" , "%s()", NULL, NULL },
#endif
#ifdef TARGET_NR_getpid
{ TARGET_NR_getpid, "getpid" , "%s()", NULL, NULL },
#endif
#ifdef TARGET_NR_getpmsg
{ TARGET_NR_getpmsg, "getpmsg" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getppid
{ TARGET_NR_getppid, "getppid" , "%s()", NULL, NULL },
#endif
#ifdef TARGET_NR_getpriority
{ TARGET_NR_getpriority, "getpriority", "%s(%#x,%#x)", NULL, NULL },
#endif
#ifdef TARGET_NR_getrandom
{ TARGET_NR_getrandom, "getrandom", NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getresgid
{ TARGET_NR_getresgid, "getresgid" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getresgid32
{ TARGET_NR_getresgid32, "getresgid32" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getresuid
{ TARGET_NR_getresuid, "getresuid" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getresuid32
{ TARGET_NR_getresuid32, "getresuid32" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getrlimit
{ TARGET_NR_getrlimit, "getrlimit" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_get_robust_list
{ TARGET_NR_get_robust_list, "get_robust_list" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getrusage
{ TARGET_NR_getrusage, "getrusage" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getsid
linux-user: Add strace support for printing arguments of truncate()/ftruncate() and getsid() This patch implements strace argument printing functionality for following syscalls: * truncate, ftruncate - truncate a file to a specified length int truncate/truncate64(const char *path, off_t length) int ftruncate/ftruncate64(int fd, off_t length) man page: https://man7.org/linux/man-pages/man2/truncate.2.html * getsid - get session ID pid_t getsid(pid_t pid) man page: https://man7.org/linux/man-pages/man2/getsid.2.html Implementation notes: Syscalls truncate/truncate64 take string argument types and thus a separate print function "print_truncate/print_truncate64" is stated in file "strace.list". This function is defined and implemented in "strace.c" by using an existing function used to print string arguments: "print_string()". For syscall ftruncate64, a separate printing function was also stated in "strace.c" as it requires a special kind of handling. The other syscalls have only primitive argument types, so the rest of the implementation was handled by stating an appropriate printing format in file "strace.list". Function "regpairs_aligned()" was cut & pasted from "syscall.c" to "qemu.h" as it is used by functions "print_truncate64()" and "print_ftruncate64()" to print the offset arguments of "truncate64()" and "ftruncate64()". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200811164553.27713-3-Filip.Bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-11 18:45:50 +02:00
{ TARGET_NR_getsid, "getsid" , "%s(%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_getsockname
{ TARGET_NR_getsockname, "getsockname" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getsockopt
{ TARGET_NR_getsockopt, "getsockopt" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_get_thread_area
{ TARGET_NR_get_thread_area, "get_thread_area", "%s(0x"TARGET_ABI_FMT_lx")",
NULL, NULL },
#endif
#ifdef TARGET_NR_gettid
{ TARGET_NR_gettid, "gettid" , "%s()", NULL, NULL },
#endif
#ifdef TARGET_NR_gettimeofday
linux-user: Add strace support for printing arguments of some clock and time functions This patch implements strace argument printing functionality for following syscalls: * clock_getres, clock_gettime, clock_settime - clock and time functions int clock_getres(clockid_t clockid, struct timespec *res) int clock_gettime(clockid_t clockid, struct timespec *tp) int clock_settime(clockid_t clockid, const struct timespec *tp) man page: https://man7.org/linux/man-pages/man2/clock_getres.2.html * gettimeofday - get time int gettimeofday(struct timeval *tv, struct timezone *tz) man page: https://man7.org/linux/man-pages/man2/gettimeofday.2.html * getitimer, setitimer - get or set value of an interval timer int getitimer(int which, struct itimerval *curr_value) int setitimer(int which, const struct itimerval *new_value, struct itimerval *old_value) man page: https://man7.org/linux/man-pages/man2/getitimer.2.html Implementation notes: All of the syscalls have some structue types as argument types and thus a separate printing function was stated in file "strace.list" for each of them. All of these functions use existing functions for their appropriate structure types ("print_timeval()" and "print_timezone()"). Functions "print_timespec()" and "print_itimerval()" were added in this patch so that they can be used to print types "struct timespec" and "struct itimerval" used by some of the syscalls. Function "print_itimerval()" uses the existing function "print_timeval()" to print fields of the structure "struct itimerval" that are of type "struct timeval". Function "print_enums()", which was introduced in the previous patch, is used to print the interval timer type which is the first argument of "getitimer()" and "setitimer()". Also, this function is used to print the clock id which is the first argument of "clock_getres()" and "clock_gettime()". For that reason, the existing function "print_clockid()" was removed in this patch. Existing function "print_clock_adjtime()" was also changed for this reason to use "print_enums()". The existing function "print_timeval()" was changed a little so that it prints the field names beside the values. Syscalls "clock_getres()" and "clock_gettime()" have the same number and types of arguments and thus their print functions "print_clock_getres" and "print_clock_gettime" share a common definition in file "strace.c". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200811164553.27713-6-Filip.Bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-11 18:45:53 +02:00
{ TARGET_NR_gettimeofday, "gettimeofday" , NULL, print_gettimeofday,
print_syscall_ret_gettimeofday },
#endif
#ifdef TARGET_NR_getuid
{ TARGET_NR_getuid, "getuid" , "%s()", NULL, NULL },
#endif
#ifdef TARGET_NR_getuid32
{ TARGET_NR_getuid32, "getuid32" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getxattr
linux-user: Add strace support for printing argument of syscalls used for extended attributes This patch implements strace argument printing functionality for following syscalls: *getxattr, lgetxattr, fgetxattr - retrieve an extended attribute value ssize_t getxattr(const char *path, const char *name, void *value, size_t size) ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size) ssize_t fgetxattr(int fd, const char *name, void *value, size_t size) man page: https://www.man7.org/linux/man-pages/man2/getxattr.2.html *listxattr, llistxattr, flistxattr - list extended attribute names ssize_t listxattr(const char *path, char *list, size_t size) ssize_t llistxattr(const char *path, char *list, size_t size) ssize_t flistxattr(int fd, char *list, size_t size) man page: https://www.man7.org/linux/man-pages/man2/listxattr.2.html *removexattr, lremovexattr, fremovexattr - remove an extended attribute int removexattr(const char *path, const char *name) int lremovexattr(const char *path, const char *name) int fremovexattr(int fd, const char *name) man page: https://www.man7.org/linux/man-pages/man2/removexattr.2.html Implementation notes: All of the syscalls have strings as argument types and thus a separate printing function was stated in file "strace.list" for every one of them. All of these printing functions were defined in "strace.c" using existing printing functions for appropriate argument types: "print_string()" - for (const char*) type "print_pointer()" - for (char*) and (void *) type "print_raw_param()" for (int) and (size_t) type Syscalls "getxattr()" and "lgetxattr()" have the same number and type of arguments and thus their print functions ("print_getxattr", "print_lgetxattr") share a same definition. The same statement applies to syscalls "listxattr()" and "llistxattr()". Function "print_syscall_ret_listxattr()" was added to print the returned list of extended attributes for syscalls "print_listxattr(), print_llistxattr() and print_flistxattr()". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200619123331.17387-4-filip.bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-06-19 14:33:28 +02:00
{ TARGET_NR_getxattr, "getxattr" , NULL, print_getxattr, NULL },
#endif
#ifdef TARGET_NR_getxgid
{ TARGET_NR_getxgid, "getxgid" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getxpid
{ TARGET_NR_getxpid, "getxpid" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getxuid
{ TARGET_NR_getxuid, "getxuid" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_gtty
{ TARGET_NR_gtty, "gtty" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_idle
{ TARGET_NR_idle, "idle" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_init_module
{ TARGET_NR_init_module, "init_module" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_inotify_add_watch
{ TARGET_NR_inotify_add_watch, "inotify_add_watch" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_inotify_init
{ TARGET_NR_inotify_init, "inotify_init" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_inotify_init1
{ TARGET_NR_inotify_init1, "inotify_init1" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_inotify_rm_watch
{ TARGET_NR_inotify_rm_watch, "inotify_rm_watch" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_io_cancel
{ TARGET_NR_io_cancel, "io_cancel" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_ioctl
linux-user: Add strace support for printing arguments of ioctl() This patch implements functionality for strace argument printing for ioctls. When running ioctls through qemu with "-strace", they get printed in format: "ioctl(fd_num,0x*,0x*) = ret_value" where the request code an the ioctl's third argument get printed in a hexadicemal format. This patch changes that by enabling strace to print both the request code name and the contents of the third argument. For example, when running ioctl RTC_SET_TIME with "-strace", with changes from this patch, it gets printed in this way: "ioctl(3,RTC_SET_TIME,{12,13,15,20,10,119,0,0,0}) = 0" In case of IOC_R type ioctls, the contents of the third argument get printed after the return value, and the argument inside the ioctl call gets printed as pointer in hexadecimal format. For example, when running RTC_RD_TIME with "-strace", with changes from this patch, it gets printed in this way: "ioctl(3,RTC_RD_TIME,0x40800374) = 0 ({22,9,13,11,5,120,0,0,0})" In case of IOC_RW type ioctls, the contents of the third argument get printed both inside the ioctl call and after the return value. Implementation notes: Functions "print_ioctl()" and "print_syscall_ret_ioctl()", that are defined in "strace.c", are listed in file "strace.list" as "call" and "result" value for ioctl. Structure definition "IOCTLEntry" as well as predefined values for IOC_R, IOC_W and IOC_RW were cut and pasted from file "syscall.c" to file "qemu.h" so that they can be used by these functions to print the contents of the third ioctl argument. Also, the "static" identifier for array "ioctl_entries[]" was removed and this array was declared as "extern" in "qemu.h" so that it can also be used by these functions. To decode the structure type of the ioctl third argument, function "thunk_print()" was defined in file "thunk.c" and its definition is somewhat simillar to that of function "thunk_convert()". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200619124727.18080-3-filip.bozuta@syrmia.com> [lv: fix close-bracket] Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-06-19 14:47:27 +02:00
{ TARGET_NR_ioctl, "ioctl" , NULL, print_ioctl,
print_syscall_ret_ioctl},
#endif
#ifdef TARGET_NR_io_destroy
{ TARGET_NR_io_destroy, "io_destroy" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_io_getevents
{ TARGET_NR_io_getevents, "io_getevents" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_ioperm
{ TARGET_NR_ioperm, "ioperm" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_iopl
{ TARGET_NR_iopl, "iopl" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_ioprio_get
{ TARGET_NR_ioprio_get, "ioprio_get" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_ioprio_set
{ TARGET_NR_ioprio_set, "ioprio_set" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_io_setup
{ TARGET_NR_io_setup, "io_setup" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_io_submit
{ TARGET_NR_io_submit, "io_submit" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_ipc
{ TARGET_NR_ipc, "ipc" , NULL, print_ipc, NULL },
#endif
#ifdef TARGET_NR_kcmp
{ TARGET_NR_kcmp, "kcmp" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_kexec_load
{ TARGET_NR_kexec_load, "kexec_load" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_keyctl
{ TARGET_NR_keyctl, "keyctl" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_kill
{ TARGET_NR_kill, "kill", NULL, print_kill, NULL },
#endif
#ifdef TARGET_NR_lchown
{ TARGET_NR_lchown, "lchown" , NULL, print_lchown, NULL },
#endif
#ifdef TARGET_NR_lchown32
{ TARGET_NR_lchown32, "lchown32" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_lgetxattr
linux-user: Add strace support for printing argument of syscalls used for extended attributes This patch implements strace argument printing functionality for following syscalls: *getxattr, lgetxattr, fgetxattr - retrieve an extended attribute value ssize_t getxattr(const char *path, const char *name, void *value, size_t size) ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size) ssize_t fgetxattr(int fd, const char *name, void *value, size_t size) man page: https://www.man7.org/linux/man-pages/man2/getxattr.2.html *listxattr, llistxattr, flistxattr - list extended attribute names ssize_t listxattr(const char *path, char *list, size_t size) ssize_t llistxattr(const char *path, char *list, size_t size) ssize_t flistxattr(int fd, char *list, size_t size) man page: https://www.man7.org/linux/man-pages/man2/listxattr.2.html *removexattr, lremovexattr, fremovexattr - remove an extended attribute int removexattr(const char *path, const char *name) int lremovexattr(const char *path, const char *name) int fremovexattr(int fd, const char *name) man page: https://www.man7.org/linux/man-pages/man2/removexattr.2.html Implementation notes: All of the syscalls have strings as argument types and thus a separate printing function was stated in file "strace.list" for every one of them. All of these printing functions were defined in "strace.c" using existing printing functions for appropriate argument types: "print_string()" - for (const char*) type "print_pointer()" - for (char*) and (void *) type "print_raw_param()" for (int) and (size_t) type Syscalls "getxattr()" and "lgetxattr()" have the same number and type of arguments and thus their print functions ("print_getxattr", "print_lgetxattr") share a same definition. The same statement applies to syscalls "listxattr()" and "llistxattr()". Function "print_syscall_ret_listxattr()" was added to print the returned list of extended attributes for syscalls "print_listxattr(), print_llistxattr() and print_flistxattr()". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200619123331.17387-4-filip.bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-06-19 14:33:28 +02:00
{ TARGET_NR_lgetxattr, "lgetxattr" , NULL, print_lgetxattr, NULL },
#endif
#ifdef TARGET_NR_link
{ TARGET_NR_link, "link" , NULL, print_link, NULL },
#endif
#ifdef TARGET_NR_linkat
{ TARGET_NR_linkat, "linkat" , NULL, print_linkat, NULL },
#endif
#ifdef TARGET_NR_Linux
{ TARGET_NR_Linux, "Linux" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_listen
{ TARGET_NR_listen, "listen" , "%s(%d,%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_listxattr
linux-user: Add strace support for printing argument of syscalls used for extended attributes This patch implements strace argument printing functionality for following syscalls: *getxattr, lgetxattr, fgetxattr - retrieve an extended attribute value ssize_t getxattr(const char *path, const char *name, void *value, size_t size) ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size) ssize_t fgetxattr(int fd, const char *name, void *value, size_t size) man page: https://www.man7.org/linux/man-pages/man2/getxattr.2.html *listxattr, llistxattr, flistxattr - list extended attribute names ssize_t listxattr(const char *path, char *list, size_t size) ssize_t llistxattr(const char *path, char *list, size_t size) ssize_t flistxattr(int fd, char *list, size_t size) man page: https://www.man7.org/linux/man-pages/man2/listxattr.2.html *removexattr, lremovexattr, fremovexattr - remove an extended attribute int removexattr(const char *path, const char *name) int lremovexattr(const char *path, const char *name) int fremovexattr(int fd, const char *name) man page: https://www.man7.org/linux/man-pages/man2/removexattr.2.html Implementation notes: All of the syscalls have strings as argument types and thus a separate printing function was stated in file "strace.list" for every one of them. All of these printing functions were defined in "strace.c" using existing printing functions for appropriate argument types: "print_string()" - for (const char*) type "print_pointer()" - for (char*) and (void *) type "print_raw_param()" for (int) and (size_t) type Syscalls "getxattr()" and "lgetxattr()" have the same number and type of arguments and thus their print functions ("print_getxattr", "print_lgetxattr") share a same definition. The same statement applies to syscalls "listxattr()" and "llistxattr()". Function "print_syscall_ret_listxattr()" was added to print the returned list of extended attributes for syscalls "print_listxattr(), print_llistxattr() and print_flistxattr()". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200619123331.17387-4-filip.bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-06-19 14:33:28 +02:00
{ TARGET_NR_listxattr, "listxattr" , NULL, print_listxattr,
print_syscall_ret_listxattr},
#endif
#ifdef TARGET_NR_llistxattr
linux-user: Add strace support for printing argument of syscalls used for extended attributes This patch implements strace argument printing functionality for following syscalls: *getxattr, lgetxattr, fgetxattr - retrieve an extended attribute value ssize_t getxattr(const char *path, const char *name, void *value, size_t size) ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size) ssize_t fgetxattr(int fd, const char *name, void *value, size_t size) man page: https://www.man7.org/linux/man-pages/man2/getxattr.2.html *listxattr, llistxattr, flistxattr - list extended attribute names ssize_t listxattr(const char *path, char *list, size_t size) ssize_t llistxattr(const char *path, char *list, size_t size) ssize_t flistxattr(int fd, char *list, size_t size) man page: https://www.man7.org/linux/man-pages/man2/listxattr.2.html *removexattr, lremovexattr, fremovexattr - remove an extended attribute int removexattr(const char *path, const char *name) int lremovexattr(const char *path, const char *name) int fremovexattr(int fd, const char *name) man page: https://www.man7.org/linux/man-pages/man2/removexattr.2.html Implementation notes: All of the syscalls have strings as argument types and thus a separate printing function was stated in file "strace.list" for every one of them. All of these printing functions were defined in "strace.c" using existing printing functions for appropriate argument types: "print_string()" - for (const char*) type "print_pointer()" - for (char*) and (void *) type "print_raw_param()" for (int) and (size_t) type Syscalls "getxattr()" and "lgetxattr()" have the same number and type of arguments and thus their print functions ("print_getxattr", "print_lgetxattr") share a same definition. The same statement applies to syscalls "listxattr()" and "llistxattr()". Function "print_syscall_ret_listxattr()" was added to print the returned list of extended attributes for syscalls "print_listxattr(), print_llistxattr() and print_flistxattr()". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200619123331.17387-4-filip.bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-06-19 14:33:28 +02:00
{ TARGET_NR_llistxattr, "llistxattr" , NULL, print_llistxattr,
print_syscall_ret_llistxattr},
#endif
#ifdef TARGET_NR__llseek
{ TARGET_NR__llseek, "_llseek" , NULL, print__llseek, NULL },
#endif
#ifdef TARGET_NR_lock
{ TARGET_NR_lock, "lock" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_lookup_dcookie
{ TARGET_NR_lookup_dcookie, "lookup_dcookie" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_lremovexattr
linux-user: Add strace support for printing argument of syscalls used for extended attributes This patch implements strace argument printing functionality for following syscalls: *getxattr, lgetxattr, fgetxattr - retrieve an extended attribute value ssize_t getxattr(const char *path, const char *name, void *value, size_t size) ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size) ssize_t fgetxattr(int fd, const char *name, void *value, size_t size) man page: https://www.man7.org/linux/man-pages/man2/getxattr.2.html *listxattr, llistxattr, flistxattr - list extended attribute names ssize_t listxattr(const char *path, char *list, size_t size) ssize_t llistxattr(const char *path, char *list, size_t size) ssize_t flistxattr(int fd, char *list, size_t size) man page: https://www.man7.org/linux/man-pages/man2/listxattr.2.html *removexattr, lremovexattr, fremovexattr - remove an extended attribute int removexattr(const char *path, const char *name) int lremovexattr(const char *path, const char *name) int fremovexattr(int fd, const char *name) man page: https://www.man7.org/linux/man-pages/man2/removexattr.2.html Implementation notes: All of the syscalls have strings as argument types and thus a separate printing function was stated in file "strace.list" for every one of them. All of these printing functions were defined in "strace.c" using existing printing functions for appropriate argument types: "print_string()" - for (const char*) type "print_pointer()" - for (char*) and (void *) type "print_raw_param()" for (int) and (size_t) type Syscalls "getxattr()" and "lgetxattr()" have the same number and type of arguments and thus their print functions ("print_getxattr", "print_lgetxattr") share a same definition. The same statement applies to syscalls "listxattr()" and "llistxattr()". Function "print_syscall_ret_listxattr()" was added to print the returned list of extended attributes for syscalls "print_listxattr(), print_llistxattr() and print_flistxattr()". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200619123331.17387-4-filip.bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-06-19 14:33:28 +02:00
{ TARGET_NR_lremovexattr, "lremovexattr" , NULL, print_lremovexattr, NULL },
#endif
#ifdef TARGET_NR_lseek
{ TARGET_NR_lseek, "lseek" , NULL, print_lseek, NULL },
#endif
#ifdef TARGET_NR_lsetxattr
{ TARGET_NR_lsetxattr, "lsetxattr" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_lstat
{ TARGET_NR_lstat, "lstat" , NULL, print_lstat, NULL },
#endif
#ifdef TARGET_NR_lstat64
{ TARGET_NR_lstat64, "lstat64" , NULL, print_lstat64, NULL },
#endif
#ifdef TARGET_NR_madvise
{ TARGET_NR_madvise, "madvise" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_madvise1
{ TARGET_NR_madvise1, "madvise1" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_mbind
{ TARGET_NR_mbind, "mbind" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_membarrier
{ TARGET_NR_membarrier, "membarrier" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_memfd_create
{ TARGET_NR_memfd_create, "memfd_create" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_memory_ordering
{ TARGET_NR_memory_ordering, "memory_ordering" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_migrate_pages
{ TARGET_NR_migrate_pages, "migrate_pages" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_mincore
{ TARGET_NR_mincore, "mincore" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_mkdir
{ TARGET_NR_mkdir, "mkdir" , NULL, print_mkdir, NULL },
#endif
#ifdef TARGET_NR_mkdirat
{ TARGET_NR_mkdirat, "mkdirat" , NULL, print_mkdirat, NULL },
#endif
#ifdef TARGET_NR_rmdir
{ TARGET_NR_rmdir, "rmdir" , NULL, print_rmdir, NULL },
#endif
#ifdef TARGET_NR_mknod
{ TARGET_NR_mknod, "mknod" , NULL, print_mknod, NULL },
#endif
#ifdef TARGET_NR_mknodat
{ TARGET_NR_mknodat, "mknodat" , NULL, print_mknodat, NULL },
#endif
#ifdef TARGET_NR_mlock
linux-user: Add strace support for printing arguments of syscalls used to lock and unlock memory This patch implements strace argument printing functionality for following syscalls: * mlock, munlock, mlockall, munlockall - lock and unlock memory int mlock(const void *addr, size_t len) int munlock(const void *addr, size_t len) int mlockall(int flags) int munlockall(void) man page: https://man7.org/linux/man-pages/man2/mlock.2.html Implementation notes: Syscall mlockall() takes an argument that is composed of predefined values which represent flags that determine the type of locking operation that is to be performed. For that reason, a printing function "print_mlockall" was stated in file "strace.list". This printing function uses an already existing function "print_flags()" to print the "flags" argument. These flags are stated inside an array "mlockall_flags" that contains values of type "struct flags". These values are instantiated using an existing macro "FLAG_TARGET()" that crates aproppriate target flag values based on those defined in files '/target_syscall.h'. These target flag values were changed from "TARGET_MLOCKALL_MCL*" to "TARGET_MCL_*" so that they can be aproppriately set and recognised in "strace.c" with "FLAG_TARGET()". Value for "MCL_ONFAULT" was added in this patch. This value was also added in "syscall.c" in function "target_to_host_mlockall_arg()". Because this flag value was added in kernel version 4.4, it is enwrapped in an #ifdef directive (both in "syscall.c" and in "strace.c") as to support older kernel versions. The other syscalls have only primitive argument types, so the rest of the implementation was handled by stating an appropriate printing format in file "strace.list". Syscall mlock2() is not implemented in "syscall.c" and thus it's argument printing is not implemented in this patch. Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200811164553.27713-4-Filip.Bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-11 18:45:51 +02:00
{ TARGET_NR_mlock, "mlock" , "%s(%p," TARGET_FMT_lu ")", NULL, NULL },
#endif
#ifdef TARGET_NR_mlock2
{ TARGET_NR_mlock2, "mlock2" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_mlockall
linux-user: Add strace support for printing arguments of syscalls used to lock and unlock memory This patch implements strace argument printing functionality for following syscalls: * mlock, munlock, mlockall, munlockall - lock and unlock memory int mlock(const void *addr, size_t len) int munlock(const void *addr, size_t len) int mlockall(int flags) int munlockall(void) man page: https://man7.org/linux/man-pages/man2/mlock.2.html Implementation notes: Syscall mlockall() takes an argument that is composed of predefined values which represent flags that determine the type of locking operation that is to be performed. For that reason, a printing function "print_mlockall" was stated in file "strace.list". This printing function uses an already existing function "print_flags()" to print the "flags" argument. These flags are stated inside an array "mlockall_flags" that contains values of type "struct flags". These values are instantiated using an existing macro "FLAG_TARGET()" that crates aproppriate target flag values based on those defined in files '/target_syscall.h'. These target flag values were changed from "TARGET_MLOCKALL_MCL*" to "TARGET_MCL_*" so that they can be aproppriately set and recognised in "strace.c" with "FLAG_TARGET()". Value for "MCL_ONFAULT" was added in this patch. This value was also added in "syscall.c" in function "target_to_host_mlockall_arg()". Because this flag value was added in kernel version 4.4, it is enwrapped in an #ifdef directive (both in "syscall.c" and in "strace.c") as to support older kernel versions. The other syscalls have only primitive argument types, so the rest of the implementation was handled by stating an appropriate printing format in file "strace.list". Syscall mlock2() is not implemented in "syscall.c" and thus it's argument printing is not implemented in this patch. Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200811164553.27713-4-Filip.Bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-11 18:45:51 +02:00
{ TARGET_NR_mlockall, "mlockall" , NULL, print_mlockall, NULL },
#endif
#ifdef TARGET_NR_mmap
{ TARGET_NR_mmap, "mmap" , NULL, print_mmap, print_syscall_ret_addr },
#endif
#ifdef TARGET_NR_mmap2
{ TARGET_NR_mmap2, "mmap2" , NULL, print_mmap2, print_syscall_ret_addr },
#endif
#ifdef TARGET_NR_modify_ldt
{ TARGET_NR_modify_ldt, "modify_ldt" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_mount
{ TARGET_NR_mount, "mount" , NULL, print_mount, NULL },
#endif
#ifdef TARGET_NR_move_pages
{ TARGET_NR_move_pages, "move_pages" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_mprotect
{ TARGET_NR_mprotect, "mprotect" , NULL, print_mprotect, NULL },
#endif
#ifdef TARGET_NR_mpx
{ TARGET_NR_mpx, "mpx" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_mq_getsetattr
{ TARGET_NR_mq_getsetattr, "mq_getsetattr" , "%s(%d,%p,%p)", NULL, NULL },
#endif
#ifdef TARGET_NR_mq_notify
{ TARGET_NR_mq_notify, "mq_notify" , "%s(%d,%p)", NULL, NULL },
#endif
#ifdef TARGET_NR_mq_open
{ TARGET_NR_mq_open, "mq_open" , NULL, print_mq_open, NULL },
#endif
#ifdef TARGET_NR_mq_timedreceive
{ TARGET_NR_mq_timedreceive, "mq_timedreceive" , "%s(%d,%p,%d,%u,%p)", NULL, NULL },
#endif
#ifdef TARGET_NR_mq_timedsend
{ TARGET_NR_mq_timedsend, "mq_timedsend" , "%s(%d,%p,%d,%u,%p)", NULL, NULL },
#endif
#ifdef TARGET_NR_mq_unlink
{ TARGET_NR_mq_unlink, "mq_unlink" , NULL, print_mq_unlink, NULL },
#endif
#ifdef TARGET_NR_mremap
{ TARGET_NR_mremap, "mremap" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_msgctl
{ TARGET_NR_msgctl, "msgctl" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_msgget
{ TARGET_NR_msgget, "msgget" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_msgrcv
{ TARGET_NR_msgrcv, "msgrcv" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_msgsnd
{ TARGET_NR_msgsnd, "msgsnd" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_msync
{ TARGET_NR_msync, "msync" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_multiplexer
{ TARGET_NR_multiplexer, "multiplexer" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_munlock
linux-user: Add strace support for printing arguments of syscalls used to lock and unlock memory This patch implements strace argument printing functionality for following syscalls: * mlock, munlock, mlockall, munlockall - lock and unlock memory int mlock(const void *addr, size_t len) int munlock(const void *addr, size_t len) int mlockall(int flags) int munlockall(void) man page: https://man7.org/linux/man-pages/man2/mlock.2.html Implementation notes: Syscall mlockall() takes an argument that is composed of predefined values which represent flags that determine the type of locking operation that is to be performed. For that reason, a printing function "print_mlockall" was stated in file "strace.list". This printing function uses an already existing function "print_flags()" to print the "flags" argument. These flags are stated inside an array "mlockall_flags" that contains values of type "struct flags". These values are instantiated using an existing macro "FLAG_TARGET()" that crates aproppriate target flag values based on those defined in files '/target_syscall.h'. These target flag values were changed from "TARGET_MLOCKALL_MCL*" to "TARGET_MCL_*" so that they can be aproppriately set and recognised in "strace.c" with "FLAG_TARGET()". Value for "MCL_ONFAULT" was added in this patch. This value was also added in "syscall.c" in function "target_to_host_mlockall_arg()". Because this flag value was added in kernel version 4.4, it is enwrapped in an #ifdef directive (both in "syscall.c" and in "strace.c") as to support older kernel versions. The other syscalls have only primitive argument types, so the rest of the implementation was handled by stating an appropriate printing format in file "strace.list". Syscall mlock2() is not implemented in "syscall.c" and thus it's argument printing is not implemented in this patch. Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200811164553.27713-4-Filip.Bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-11 18:45:51 +02:00
{ TARGET_NR_munlock, "munlock" , "%s(%p," TARGET_FMT_lu ")", NULL, NULL },
#endif
#ifdef TARGET_NR_munlockall
linux-user: Add strace support for printing arguments of syscalls used to lock and unlock memory This patch implements strace argument printing functionality for following syscalls: * mlock, munlock, mlockall, munlockall - lock and unlock memory int mlock(const void *addr, size_t len) int munlock(const void *addr, size_t len) int mlockall(int flags) int munlockall(void) man page: https://man7.org/linux/man-pages/man2/mlock.2.html Implementation notes: Syscall mlockall() takes an argument that is composed of predefined values which represent flags that determine the type of locking operation that is to be performed. For that reason, a printing function "print_mlockall" was stated in file "strace.list". This printing function uses an already existing function "print_flags()" to print the "flags" argument. These flags are stated inside an array "mlockall_flags" that contains values of type "struct flags". These values are instantiated using an existing macro "FLAG_TARGET()" that crates aproppriate target flag values based on those defined in files '/target_syscall.h'. These target flag values were changed from "TARGET_MLOCKALL_MCL*" to "TARGET_MCL_*" so that they can be aproppriately set and recognised in "strace.c" with "FLAG_TARGET()". Value for "MCL_ONFAULT" was added in this patch. This value was also added in "syscall.c" in function "target_to_host_mlockall_arg()". Because this flag value was added in kernel version 4.4, it is enwrapped in an #ifdef directive (both in "syscall.c" and in "strace.c") as to support older kernel versions. The other syscalls have only primitive argument types, so the rest of the implementation was handled by stating an appropriate printing format in file "strace.list". Syscall mlock2() is not implemented in "syscall.c" and thus it's argument printing is not implemented in this patch. Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200811164553.27713-4-Filip.Bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-11 18:45:51 +02:00
{ TARGET_NR_munlockall, "munlockall" , "%s()", NULL, NULL },
#endif
#ifdef TARGET_NR_munmap
{ TARGET_NR_munmap, "munmap" , NULL, print_munmap, NULL },
#endif
#ifdef TARGET_NR_name_to_handle_at
{ TARGET_NR_name_to_handle_at, "name_to_handle_at" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_nanosleep
{ TARGET_NR_nanosleep, "nanosleep" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_fstatat64
{ TARGET_NR_fstatat64, "fstatat64" , NULL, print_fstatat64, NULL },
#endif
#ifdef TARGET_NR_newfstatat
{ TARGET_NR_newfstatat, "newfstatat" , NULL, print_newfstatat, NULL },
#endif
#ifdef TARGET_NR__newselect
{ TARGET_NR__newselect, "_newselect" , NULL, print_newselect, print_syscall_ret_newselect },
#endif
#ifdef TARGET_NR_nfsservctl
{ TARGET_NR_nfsservctl, "nfsservctl" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_nice
{ TARGET_NR_nice, "nice" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_old_adjtimex
{ TARGET_NR_old_adjtimex, "old_adjtimex" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_oldfstat
{ TARGET_NR_oldfstat, "oldfstat" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_oldlstat
{ TARGET_NR_oldlstat, "oldlstat" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_oldolduname
{ TARGET_NR_oldolduname, "oldolduname" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_oldstat
{ TARGET_NR_oldstat, "oldstat" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_olduname
{ TARGET_NR_olduname, "olduname" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_open
{ TARGET_NR_open, "open" , NULL, print_open, NULL },
#endif
#ifdef TARGET_NR_openat
{ TARGET_NR_openat, "openat" , NULL, print_openat, NULL },
#endif
#ifdef TARGET_NR_osf_adjtime
{ TARGET_NR_osf_adjtime, "osf_adjtime" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_afs_syscall
{ TARGET_NR_osf_afs_syscall, "osf_afs_syscall" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_alt_plock
{ TARGET_NR_osf_alt_plock, "osf_alt_plock" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_alt_setsid
{ TARGET_NR_osf_alt_setsid, "osf_alt_setsid" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_alt_sigpending
{ TARGET_NR_osf_alt_sigpending, "osf_alt_sigpending" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_asynch_daemon
{ TARGET_NR_osf_asynch_daemon, "osf_asynch_daemon" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_audcntl
{ TARGET_NR_osf_audcntl, "osf_audcntl" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_audgen
{ TARGET_NR_osf_audgen, "osf_audgen" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_chflags
{ TARGET_NR_osf_chflags, "osf_chflags" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_execve
{ TARGET_NR_osf_execve, "osf_execve" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_exportfs
{ TARGET_NR_osf_exportfs, "osf_exportfs" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_fchflags
{ TARGET_NR_osf_fchflags, "osf_fchflags" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_fdatasync
{ TARGET_NR_osf_fdatasync, "osf_fdatasync" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_fpathconf
{ TARGET_NR_osf_fpathconf, "osf_fpathconf" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_fstatfs
{ TARGET_NR_osf_fstatfs, "osf_fstatfs" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_fuser
{ TARGET_NR_osf_fuser, "osf_fuser" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_getaddressconf
{ TARGET_NR_osf_getaddressconf, "osf_getaddressconf" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_getdirentries
{ TARGET_NR_osf_getdirentries, "osf_getdirentries" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_getdomainname
{ TARGET_NR_osf_getdomainname, "osf_getdomainname" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_getfh
{ TARGET_NR_osf_getfh, "osf_getfh" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_getfsstat
{ TARGET_NR_osf_getfsstat, "osf_getfsstat" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_gethostid
{ TARGET_NR_osf_gethostid, "osf_gethostid" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_getitimer
{ TARGET_NR_osf_getitimer, "osf_getitimer" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_getlogin
{ TARGET_NR_osf_getlogin, "osf_getlogin" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_getmnt
{ TARGET_NR_osf_getmnt, "osf_getmnt" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_getrusage
{ TARGET_NR_osf_getrusage, "osf_getrusage" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_getsysinfo
{ TARGET_NR_osf_getsysinfo, "osf_getsysinfo" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_gettimeofday
{ TARGET_NR_osf_gettimeofday, "osf_gettimeofday" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_kloadcall
{ TARGET_NR_osf_kloadcall, "osf_kloadcall" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_kmodcall
{ TARGET_NR_osf_kmodcall, "osf_kmodcall" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_memcntl
{ TARGET_NR_osf_memcntl, "osf_memcntl" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_mincore
{ TARGET_NR_osf_mincore, "osf_mincore" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_mount
{ TARGET_NR_osf_mount, "osf_mount" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_mremap
{ TARGET_NR_osf_mremap, "osf_mremap" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_msfs_syscall
{ TARGET_NR_osf_msfs_syscall, "osf_msfs_syscall" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_msleep
{ TARGET_NR_osf_msleep, "osf_msleep" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_mvalid
{ TARGET_NR_osf_mvalid, "osf_mvalid" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_mwakeup
{ TARGET_NR_osf_mwakeup, "osf_mwakeup" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_naccept
{ TARGET_NR_osf_naccept, "osf_naccept" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_nfssvc
{ TARGET_NR_osf_nfssvc, "osf_nfssvc" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_ngetpeername
{ TARGET_NR_osf_ngetpeername, "osf_ngetpeername" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_ngetsockname
{ TARGET_NR_osf_ngetsockname, "osf_ngetsockname" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_nrecvfrom
{ TARGET_NR_osf_nrecvfrom, "osf_nrecvfrom" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_nrecvmsg
{ TARGET_NR_osf_nrecvmsg, "osf_nrecvmsg" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_nsendmsg
{ TARGET_NR_osf_nsendmsg, "osf_nsendmsg" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_ntp_adjtime
{ TARGET_NR_osf_ntp_adjtime, "osf_ntp_adjtime" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_ntp_gettime
{ TARGET_NR_osf_ntp_gettime, "osf_ntp_gettime" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_old_creat
{ TARGET_NR_osf_old_creat, "osf_old_creat" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_old_fstat
{ TARGET_NR_osf_old_fstat, "osf_old_fstat" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_old_getpgrp
{ TARGET_NR_osf_old_getpgrp, "osf_old_getpgrp" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_old_killpg
{ TARGET_NR_osf_old_killpg, "osf_old_killpg" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_old_lstat
{ TARGET_NR_osf_old_lstat, "osf_old_lstat" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_old_open
{ TARGET_NR_osf_old_open, "osf_old_open" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_oldquota
{ TARGET_NR_osf_oldquota, "osf_oldquota" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_old_sigaction
{ TARGET_NR_osf_old_sigaction, "osf_old_sigaction" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_old_sigblock
{ TARGET_NR_osf_old_sigblock, "osf_old_sigblock" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_old_sigreturn
{ TARGET_NR_osf_old_sigreturn, "osf_old_sigreturn" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_old_sigsetmask
{ TARGET_NR_osf_old_sigsetmask, "osf_old_sigsetmask" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_old_sigvec
{ TARGET_NR_osf_old_sigvec, "osf_old_sigvec" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_old_stat
{ TARGET_NR_osf_old_stat, "osf_old_stat" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_old_vadvise
{ TARGET_NR_osf_old_vadvise, "osf_old_vadvise" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_old_vtrace
{ TARGET_NR_osf_old_vtrace, "osf_old_vtrace" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_old_wait
{ TARGET_NR_osf_old_wait, "osf_old_wait" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_pathconf
{ TARGET_NR_osf_pathconf, "osf_pathconf" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_pid_block
{ TARGET_NR_osf_pid_block, "osf_pid_block" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_pid_unblock
{ TARGET_NR_osf_pid_unblock, "osf_pid_unblock" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_plock
{ TARGET_NR_osf_plock, "osf_plock" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_priocntlset
{ TARGET_NR_osf_priocntlset, "osf_priocntlset" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_profil
{ TARGET_NR_osf_profil, "osf_profil" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_proplist_syscall
{ TARGET_NR_osf_proplist_syscall, "osf_proplist_syscall" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_reboot
{ TARGET_NR_osf_reboot, "osf_reboot" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_revoke
{ TARGET_NR_osf_revoke, "osf_revoke" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_sbrk
{ TARGET_NR_osf_sbrk, "osf_sbrk" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_security
{ TARGET_NR_osf_security, "osf_security" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_select
{ TARGET_NR_osf_select, "osf_select" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_sethostid
{ TARGET_NR_osf_sethostid, "osf_sethostid" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_setitimer
{ TARGET_NR_osf_setitimer, "osf_setitimer" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_setlogin
{ TARGET_NR_osf_setlogin, "osf_setlogin" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_set_program_attributes
{ TARGET_NR_osf_set_program_attributes, "osf_set_program_attributes" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_set_speculative
{ TARGET_NR_osf_set_speculative, "osf_set_speculative" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_setsysinfo
{ TARGET_NR_osf_setsysinfo, "osf_setsysinfo" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_settimeofday
{ TARGET_NR_osf_settimeofday, "osf_settimeofday" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_shmat
{ TARGET_NR_osf_shmat, "osf_shmat" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_signal
{ TARGET_NR_osf_signal, "osf_signal" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_sigprocmask
{ TARGET_NR_osf_sigprocmask, "osf_sigprocmask" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_sigsendset
{ TARGET_NR_osf_sigsendset, "osf_sigsendset" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_sigstack
{ TARGET_NR_osf_sigstack, "osf_sigstack" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_sigwaitprim
{ TARGET_NR_osf_sigwaitprim, "osf_sigwaitprim" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_sstk
{ TARGET_NR_osf_sstk, "osf_sstk" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_statfs
{ TARGET_NR_osf_statfs, "osf_statfs" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_subsys_info
{ TARGET_NR_osf_subsys_info, "osf_subsys_info" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_swapctl
{ TARGET_NR_osf_swapctl, "osf_swapctl" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_swapon
{ TARGET_NR_osf_swapon, "osf_swapon" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_syscall
{ TARGET_NR_osf_syscall, "osf_syscall" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_sysinfo
{ TARGET_NR_osf_sysinfo, "osf_sysinfo" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_table
{ TARGET_NR_osf_table, "osf_table" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_uadmin
{ TARGET_NR_osf_uadmin, "osf_uadmin" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_usleep_thread
{ TARGET_NR_osf_usleep_thread, "osf_usleep_thread" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_uswitch
{ TARGET_NR_osf_uswitch, "osf_uswitch" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_utc_adjtime
{ TARGET_NR_osf_utc_adjtime, "osf_utc_adjtime" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_utc_gettime
{ TARGET_NR_osf_utc_gettime, "osf_utc_gettime" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_utimes
{ TARGET_NR_osf_utimes, "osf_utimes" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_utsname
{ TARGET_NR_osf_utsname, "osf_utsname" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_wait4
{ TARGET_NR_osf_wait4, "osf_wait4" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_osf_waitid
{ TARGET_NR_osf_waitid, "osf_waitid" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_pause
{ TARGET_NR_pause, "pause" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_pciconfig_iobase
{ TARGET_NR_pciconfig_iobase, "pciconfig_iobase" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_pciconfig_read
{ TARGET_NR_pciconfig_read, "pciconfig_read" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_pciconfig_write
{ TARGET_NR_pciconfig_write, "pciconfig_write" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_perf_event_open
{ TARGET_NR_perf_event_open, "perf_event_open" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_perfctr
{ TARGET_NR_perfctr, "perfctr" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_personality
{ TARGET_NR_personality, "personality" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_pipe
{ TARGET_NR_pipe, "pipe" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_pivot_root
{ TARGET_NR_pivot_root, "pivot_root" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_poll
{ TARGET_NR_poll, "poll" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_ppoll
{ TARGET_NR_ppoll, "ppoll" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_prctl
{ TARGET_NR_prctl, "prctl" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_pread64
{ TARGET_NR_pread64, "pread64" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_preadv
{ TARGET_NR_preadv, "preadv" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_prlimit64
{ TARGET_NR_prlimit64, "prlimit64" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_process_vm_readv
{ TARGET_NR_process_vm_readv, "process_vm_readv" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_process_vm_writev
{ TARGET_NR_process_vm_writev, "process_vm_writev" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_prof
{ TARGET_NR_prof, "prof" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_profil
{ TARGET_NR_profil, "profil" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_pselect6
{ TARGET_NR_pselect6, "pselect6" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_ptrace
{ TARGET_NR_ptrace, "ptrace" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_putpmsg
{ TARGET_NR_putpmsg, "putpmsg" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_pwrite64
{ TARGET_NR_pwrite64, "pwrite64" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_pwritev
{ TARGET_NR_pwritev, "pwritev" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_query_module
{ TARGET_NR_query_module, "query_module" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_quotactl
{ TARGET_NR_quotactl, "quotactl" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_read
{ TARGET_NR_read, "read" , "%s(%d,%#x,%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_readahead
{ TARGET_NR_readahead, "readahead" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_readdir
{ TARGET_NR_readdir, "readdir" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_readlink
{ TARGET_NR_readlink, "readlink" , NULL, print_readlink, NULL },
#endif
#ifdef TARGET_NR_readlinkat
{ TARGET_NR_readlinkat, "readlinkat" , NULL, print_readlinkat, NULL },
#endif
#ifdef TARGET_NR_readv
{ TARGET_NR_readv, "readv" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_reboot
{ TARGET_NR_reboot, "reboot" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_recv
{ TARGET_NR_recv, "recv" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_recvfrom
{ TARGET_NR_recvfrom, "recvfrom" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_recvmmsg
{ TARGET_NR_recvmmsg, "recvmmsg" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_recvmsg
{ TARGET_NR_recvmsg, "recvmsg" , "%s(%d,%p,%#x)", NULL, NULL },
#endif
#ifdef TARGET_NR_remap_file_pages
{ TARGET_NR_remap_file_pages, "remap_file_pages" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_removexattr
linux-user: Add strace support for printing argument of syscalls used for extended attributes This patch implements strace argument printing functionality for following syscalls: *getxattr, lgetxattr, fgetxattr - retrieve an extended attribute value ssize_t getxattr(const char *path, const char *name, void *value, size_t size) ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size) ssize_t fgetxattr(int fd, const char *name, void *value, size_t size) man page: https://www.man7.org/linux/man-pages/man2/getxattr.2.html *listxattr, llistxattr, flistxattr - list extended attribute names ssize_t listxattr(const char *path, char *list, size_t size) ssize_t llistxattr(const char *path, char *list, size_t size) ssize_t flistxattr(int fd, char *list, size_t size) man page: https://www.man7.org/linux/man-pages/man2/listxattr.2.html *removexattr, lremovexattr, fremovexattr - remove an extended attribute int removexattr(const char *path, const char *name) int lremovexattr(const char *path, const char *name) int fremovexattr(int fd, const char *name) man page: https://www.man7.org/linux/man-pages/man2/removexattr.2.html Implementation notes: All of the syscalls have strings as argument types and thus a separate printing function was stated in file "strace.list" for every one of them. All of these printing functions were defined in "strace.c" using existing printing functions for appropriate argument types: "print_string()" - for (const char*) type "print_pointer()" - for (char*) and (void *) type "print_raw_param()" for (int) and (size_t) type Syscalls "getxattr()" and "lgetxattr()" have the same number and type of arguments and thus their print functions ("print_getxattr", "print_lgetxattr") share a same definition. The same statement applies to syscalls "listxattr()" and "llistxattr()". Function "print_syscall_ret_listxattr()" was added to print the returned list of extended attributes for syscalls "print_listxattr(), print_llistxattr() and print_flistxattr()". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200619123331.17387-4-filip.bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-06-19 14:33:28 +02:00
{ TARGET_NR_removexattr, "removexattr" , NULL, print_removexattr, NULL },
#endif
#ifdef TARGET_NR_rename
{ TARGET_NR_rename, "rename" , NULL, print_rename, NULL },
#endif
#ifdef TARGET_NR_renameat
{ TARGET_NR_renameat, "renameat" , NULL, print_renameat, NULL },
#endif
#ifdef TARGET_NR_renameat2
{ TARGET_NR_renameat2, "renameat2" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_request_key
{ TARGET_NR_request_key, "request_key" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_reserved177
{ TARGET_NR_reserved177, "reserved177" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_reserved193
{ TARGET_NR_reserved193, "reserved193" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_reserved221
{ TARGET_NR_reserved221, "reserved221" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_reserved82
{ TARGET_NR_reserved82, "reserved82" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_restart_syscall
{ TARGET_NR_restart_syscall, "restart_syscall" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_rmdir
{ TARGET_NR_rmdir, "rmdir" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_rt_sigaction
{ TARGET_NR_rt_sigaction, "rt_sigaction" , NULL, print_rt_sigaction, NULL },
#endif
#ifdef TARGET_NR_rt_sigpending
{ TARGET_NR_rt_sigpending, "rt_sigpending" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_rt_sigprocmask
{ TARGET_NR_rt_sigprocmask, "rt_sigprocmask" , NULL, print_rt_sigprocmask, NULL },
#endif
#ifdef TARGET_NR_rt_sigqueueinfo
{ TARGET_NR_rt_sigqueueinfo, "rt_sigqueueinfo" , NULL, print_rt_sigqueueinfo, NULL },
#endif
#ifdef TARGET_NR_rt_sigreturn
{ TARGET_NR_rt_sigreturn, "rt_sigreturn" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_rt_sigsuspend
{ TARGET_NR_rt_sigsuspend, "rt_sigsuspend" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_rt_sigtimedwait
{ TARGET_NR_rt_sigtimedwait, "rt_sigtimedwait" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_rt_tgsigqueueinfo
{ TARGET_NR_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" , NULL, print_rt_tgsigqueueinfo, NULL },
#endif
#ifdef TARGET_NR_sched_getaffinity
{ TARGET_NR_sched_getaffinity, "sched_getaffinity" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sched_get_affinity
{ TARGET_NR_sched_get_affinity, "sched_get_affinity" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sched_getattr
{ TARGET_NR_sched_getattr, "sched_getattr" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sched_getparam
{ TARGET_NR_sched_getparam, "sched_getparam" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sched_get_priority_max
{ TARGET_NR_sched_get_priority_max, "sched_get_priority_max" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sched_get_priority_min
{ TARGET_NR_sched_get_priority_min, "sched_get_priority_min" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sched_getscheduler
{ TARGET_NR_sched_getscheduler, "sched_getscheduler" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sched_rr_get_interval
{ TARGET_NR_sched_rr_get_interval, "sched_rr_get_interval" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sched_setaffinity
{ TARGET_NR_sched_setaffinity, "sched_setaffinity" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sched_setatt
{ TARGET_NR_sched_setatt, "sched_setatt" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sched_set_affinity
{ TARGET_NR_sched_set_affinity, "sched_set_affinity" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sched_setparam
{ TARGET_NR_sched_setparam, "sched_setparam" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sched_setscheduler
{ TARGET_NR_sched_setscheduler, "sched_setscheduler" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sched_yield
{ TARGET_NR_sched_yield, "sched_yield" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_seccomp
{ TARGET_NR_seccomp, "seccomp" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_security
{ TARGET_NR_security, "security" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_select
{ TARGET_NR_select, "select" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_semctl
{ TARGET_NR_semctl, "semctl" , NULL, print_semctl, NULL },
#endif
#ifdef TARGET_NR_semget
{ TARGET_NR_semget, "semget" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_semop
{ TARGET_NR_semop, "semop" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_semtimedop
{ TARGET_NR_semtimedop, "semtimedop" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_send
{ TARGET_NR_send, "send" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sendfile
{ TARGET_NR_sendfile, "sendfile" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sendfile64
{ TARGET_NR_sendfile64, "sendfile64" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sendmmsg
{ TARGET_NR_sendmmsg, "sendmmsg" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sendmsg
{ TARGET_NR_sendmsg, "sendmsg" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sendto
{ TARGET_NR_sendto, "sendto" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_setdomainname
{ TARGET_NR_setdomainname, "setdomainname" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_setfsgid
{ TARGET_NR_setfsgid, "setfsgid" , "%s(%u)", NULL, NULL },
#endif
#ifdef TARGET_NR_setfsgid32
{ TARGET_NR_setfsgid32, "setfsgid32" , "%s(%u)" , NULL, NULL },
#endif
#ifdef TARGET_NR_setfsuid
{ TARGET_NR_setfsuid, "setfsuid" , "%s(%u)" , NULL, NULL },
#endif
#ifdef TARGET_NR_setfsuid32
{ TARGET_NR_setfsuid32, "setfsuid32" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_setgid
{ TARGET_NR_setgid, "setgid" , "%s(%u)", NULL, NULL },
#endif
#ifdef TARGET_NR_setgid32
{ TARGET_NR_setgid32, "setgid32" , "%s(%u)", NULL, NULL },
#endif
#ifdef TARGET_NR_setgroups
{ TARGET_NR_setgroups, "setgroups" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_setgroups32
{ TARGET_NR_setgroups32, "setgroups32" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sethae
{ TARGET_NR_sethae, "sethae" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sethostname
{ TARGET_NR_sethostname, "sethostname" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_setitimer
linux-user: Add strace support for printing arguments of some clock and time functions This patch implements strace argument printing functionality for following syscalls: * clock_getres, clock_gettime, clock_settime - clock and time functions int clock_getres(clockid_t clockid, struct timespec *res) int clock_gettime(clockid_t clockid, struct timespec *tp) int clock_settime(clockid_t clockid, const struct timespec *tp) man page: https://man7.org/linux/man-pages/man2/clock_getres.2.html * gettimeofday - get time int gettimeofday(struct timeval *tv, struct timezone *tz) man page: https://man7.org/linux/man-pages/man2/gettimeofday.2.html * getitimer, setitimer - get or set value of an interval timer int getitimer(int which, struct itimerval *curr_value) int setitimer(int which, const struct itimerval *new_value, struct itimerval *old_value) man page: https://man7.org/linux/man-pages/man2/getitimer.2.html Implementation notes: All of the syscalls have some structue types as argument types and thus a separate printing function was stated in file "strace.list" for each of them. All of these functions use existing functions for their appropriate structure types ("print_timeval()" and "print_timezone()"). Functions "print_timespec()" and "print_itimerval()" were added in this patch so that they can be used to print types "struct timespec" and "struct itimerval" used by some of the syscalls. Function "print_itimerval()" uses the existing function "print_timeval()" to print fields of the structure "struct itimerval" that are of type "struct timeval". Function "print_enums()", which was introduced in the previous patch, is used to print the interval timer type which is the first argument of "getitimer()" and "setitimer()". Also, this function is used to print the clock id which is the first argument of "clock_getres()" and "clock_gettime()". For that reason, the existing function "print_clockid()" was removed in this patch. Existing function "print_clock_adjtime()" was also changed for this reason to use "print_enums()". The existing function "print_timeval()" was changed a little so that it prints the field names beside the values. Syscalls "clock_getres()" and "clock_gettime()" have the same number and types of arguments and thus their print functions "print_clock_getres" and "print_clock_gettime" share a common definition in file "strace.c". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200811164553.27713-6-Filip.Bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-11 18:45:53 +02:00
{ TARGET_NR_setitimer, "setitimer" , NULL, print_setitimer,
print_syscall_ret_setitimer },
#endif
#ifdef TARGET_NR_set_mempolicy
{ TARGET_NR_set_mempolicy, "set_mempolicy" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_setns
{ TARGET_NR_setns, "setns" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_setpgid
{ TARGET_NR_setpgid, "setpgid" , "%s(%u,%u)", NULL, NULL },
#endif
#ifdef TARGET_NR_setpgrp
{ TARGET_NR_setpgrp, "setpgrp" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_setpriority
{ TARGET_NR_setpriority, "setpriority" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_setregid
{ TARGET_NR_setregid, "setregid" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_setregid32
{ TARGET_NR_setregid32, "setregid32" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_setresgid
{ TARGET_NR_setresgid, "setresgid" , "%s(%u,%u,%u)", NULL, NULL },
#endif
#ifdef TARGET_NR_setresgid32
{ TARGET_NR_setresgid32, "setresgid32" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_setresuid
{ TARGET_NR_setresuid, "setresuid" , "%s(%u,%u,%u)", NULL, NULL },
#endif
#ifdef TARGET_NR_setresuid32
{ TARGET_NR_setresuid32, "setresuid32" , "%s(%u,%u,%u)", NULL, NULL },
#endif
#ifdef TARGET_NR_setreuid
{ TARGET_NR_setreuid, "setreuid" , "%s(%u,%u)", NULL, NULL },
#endif
#ifdef TARGET_NR_setreuid32
{ TARGET_NR_setreuid32, "setreuid32" , "%s(%u,%u)", NULL, NULL },
#endif
#ifdef TARGET_NR_setrlimit
{ TARGET_NR_setrlimit, "setrlimit" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_set_robust_list
{ TARGET_NR_set_robust_list, "set_robust_list" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_setsid
{ TARGET_NR_setsid, "setsid" , "%s()", NULL, NULL },
#endif
#ifdef TARGET_NR_setsockopt
{ TARGET_NR_setsockopt, "setsockopt" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_set_thread_area
{ TARGET_NR_set_thread_area, "set_thread_area", "%s(0x"TARGET_ABI_FMT_lx")",
NULL, NULL },
#endif
#ifdef TARGET_NR_set_tid_address
{ TARGET_NR_set_tid_address, "set_tid_address" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_settimeofday
{ TARGET_NR_settimeofday, "settimeofday" , NULL, print_settimeofday, NULL },
#endif
#ifdef TARGET_NR_setuid
{ TARGET_NR_setuid, "setuid" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_setuid32
{ TARGET_NR_setuid32, "setuid32" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_setxattr
{ TARGET_NR_setxattr, "setxattr" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sgetmask
{ TARGET_NR_sgetmask, "sgetmask" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_shmat
{ TARGET_NR_shmat, "shmat" , NULL, NULL, print_syscall_ret_addr },
#endif
#ifdef TARGET_NR_shmctl
{ TARGET_NR_shmctl, "shmctl" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_shmdt
{ TARGET_NR_shmdt, "shmdt" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_shmget
{ TARGET_NR_shmget, "shmget" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_shutdown
{ TARGET_NR_shutdown, "shutdown" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sigaction
{ TARGET_NR_sigaction, "sigaction" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sigaltstack
{ TARGET_NR_sigaltstack, "sigaltstack" , "%s(%p,%p)", NULL, NULL },
#endif
#ifdef TARGET_NR_signal
{ TARGET_NR_signal, "signal" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_signalfd
{ TARGET_NR_signalfd, "signalfd" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_signalfd4
{ TARGET_NR_signalfd4, "signalfd4" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sigpending
{ TARGET_NR_sigpending, "sigpending" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sigprocmask
{ TARGET_NR_sigprocmask, "sigprocmask" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sigreturn
{ TARGET_NR_sigreturn, "sigreturn" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sigsuspend
{ TARGET_NR_sigsuspend, "sigsuspend" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_socket
{ TARGET_NR_socket, "socket" , NULL, print_socket, NULL },
#endif
#ifdef TARGET_NR_socketcall
{ TARGET_NR_socketcall, "socketcall" , NULL, print_socketcall, NULL },
#endif
#ifdef TARGET_NR_socketpair
{ TARGET_NR_socketpair, "socketpair" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_splice
{ TARGET_NR_splice, "splice" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_ssetmask
{ TARGET_NR_ssetmask, "ssetmask" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_stat
{ TARGET_NR_stat, "stat" , NULL, print_stat, NULL },
#endif
#ifdef TARGET_NR_stat64
{ TARGET_NR_stat64, "stat64" , NULL, print_stat64, NULL },
#endif
#ifdef TARGET_NR_statfs
{ TARGET_NR_statfs, "statfs" , NULL, print_statfs, NULL },
#endif
#ifdef TARGET_NR_statfs64
{ TARGET_NR_statfs64, "statfs64" , NULL, print_statfs64, NULL },
#endif
#ifdef TARGET_NR_stime
{ TARGET_NR_stime, "stime" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_streams1
{ TARGET_NR_streams1, "streams1" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_streams2
{ TARGET_NR_streams2, "streams2" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_stty
{ TARGET_NR_stty, "stty" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_swapcontext
{ TARGET_NR_swapcontext, "swapcontext" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_swapoff
{ TARGET_NR_swapoff, "swapoff" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_swapon
{ TARGET_NR_swapon, "swapon" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_symlink
{ TARGET_NR_symlink, "symlink" , NULL, print_symlink, NULL },
#endif
#ifdef TARGET_NR_symlinkat
{ TARGET_NR_symlinkat, "symlinkat", NULL, print_symlinkat, NULL },
#endif
#ifdef TARGET_NR_sync
{ TARGET_NR_sync, "sync" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_syncfs
{ TARGET_NR_syncfs, "syncfs" , "%s(%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_syscall
{ TARGET_NR_syscall, "syscall" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR__sysctl
{ TARGET_NR__sysctl, "_sysctl" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sysfs
{ TARGET_NR_sysfs, "sysfs" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sysinfo
{ TARGET_NR_sysinfo, "sysinfo" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sys_kexec_load
{ TARGET_NR_sys_kexec_load, "sys_kexec_load" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_syslog
linux-user: Fix syslog() syscall support There are currently several problems related to syslog() support. For example, if the second argument "bufp" of target syslog() syscall is NULL, the current implementation always returns error code EFAULT. However, NULL is a perfectly valid value for the second argument for many use cases of this syscall. This is, for example, visible from this excerpt of man page for syslog(2): > EINVAL Bad arguments (e.g., bad type; or for type 2, 3, or 4, buf is > NULL, or len is less than zero; or for type 8, the level is > outside the range 1 to 8). Moreover, the argument "bufp" is ignored for all cases of values of the first argument, except 2, 3 and 4. This means that for such cases (the first argument is not 2, 3 or 4), there is no need to pass "buf" between host and target, and it can be set to NULL while calling host's syslog(), without loss of emulation accuracy. Note also that if "bufp" is NULL and the first argument is 2, 3 or 4, the correct returned error code is EINVAL, not EFAULT. All these details are reflected in this patch. "#ifdef TARGET_NR_syslog" is also proprerly inserted when needed. Support for Qemu's "-strace" switch for syslog() syscall is included too. LTP tests syslog11 and syslog12 pass with this patch (while fail without it), on any platform. Changes to original patch by Riku Voipio: fixed error paths in TARGET_SYSLOG_ACTION_READ_ALL to match http://lxr.free-electrons.com/source/kernel/printk/printk.c?v=4.7#L1335 Should fix also the build error in: https://lists.gnu.org/archive/html/qemu-devel/2016-10/msg03721.html Signed-off-by: Aleksandar Markovic <aleksandar.markovic@imgtec.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2016-09-22 18:56:58 +02:00
{ TARGET_NR_syslog, "syslog" , NULL, print_syslog, NULL },
#endif
#ifdef TARGET_NR_sysmips
{ TARGET_NR_sysmips, "sysmips" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sys_setaltroot
{ TARGET_NR_sys_setaltroot, "sys_setaltroot" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_tee
{ TARGET_NR_tee, "tee" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_tgkill
{ TARGET_NR_tgkill, "tgkill" , NULL, print_tgkill, NULL },
#endif
#ifdef TARGET_NR_time
{ TARGET_NR_time, "time" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_timer_create
{ TARGET_NR_timer_create, "timer_create" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_timer_delete
{ TARGET_NR_timer_delete, "timer_delete" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_timer_getoverrun
{ TARGET_NR_timer_getoverrun, "timer_getoverrun" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_timer_gettime
{ TARGET_NR_timer_gettime, "timer_gettime" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_timer_settime
{ TARGET_NR_timer_settime, "timer_settime" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_timerfd
{ TARGET_NR_timerfd, "timerfd" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_timerfd_create
{ TARGET_NR_timerfd_create, "timerfd_create" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_timerfd_gettime
{ TARGET_NR_timerfd_gettime, "timerfd_gettime" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_timerfd_settime
{ TARGET_NR_timerfd_settime, "timerfd_settime" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_times
{ TARGET_NR_times, "times" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_tkill
{ TARGET_NR_tkill, "tkill" , NULL, print_tkill, NULL },
#endif
#ifdef TARGET_NR_truncate
linux-user: Add strace support for printing arguments of truncate()/ftruncate() and getsid() This patch implements strace argument printing functionality for following syscalls: * truncate, ftruncate - truncate a file to a specified length int truncate/truncate64(const char *path, off_t length) int ftruncate/ftruncate64(int fd, off_t length) man page: https://man7.org/linux/man-pages/man2/truncate.2.html * getsid - get session ID pid_t getsid(pid_t pid) man page: https://man7.org/linux/man-pages/man2/getsid.2.html Implementation notes: Syscalls truncate/truncate64 take string argument types and thus a separate print function "print_truncate/print_truncate64" is stated in file "strace.list". This function is defined and implemented in "strace.c" by using an existing function used to print string arguments: "print_string()". For syscall ftruncate64, a separate printing function was also stated in "strace.c" as it requires a special kind of handling. The other syscalls have only primitive argument types, so the rest of the implementation was handled by stating an appropriate printing format in file "strace.list". Function "regpairs_aligned()" was cut & pasted from "syscall.c" to "qemu.h" as it is used by functions "print_truncate64()" and "print_ftruncate64()" to print the offset arguments of "truncate64()" and "ftruncate64()". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200811164553.27713-3-Filip.Bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-11 18:45:50 +02:00
{ TARGET_NR_truncate, "truncate" , NULL, print_truncate, NULL },
#endif
#ifdef TARGET_NR_truncate64
linux-user: Add strace support for printing arguments of truncate()/ftruncate() and getsid() This patch implements strace argument printing functionality for following syscalls: * truncate, ftruncate - truncate a file to a specified length int truncate/truncate64(const char *path, off_t length) int ftruncate/ftruncate64(int fd, off_t length) man page: https://man7.org/linux/man-pages/man2/truncate.2.html * getsid - get session ID pid_t getsid(pid_t pid) man page: https://man7.org/linux/man-pages/man2/getsid.2.html Implementation notes: Syscalls truncate/truncate64 take string argument types and thus a separate print function "print_truncate/print_truncate64" is stated in file "strace.list". This function is defined and implemented in "strace.c" by using an existing function used to print string arguments: "print_string()". For syscall ftruncate64, a separate printing function was also stated in "strace.c" as it requires a special kind of handling. The other syscalls have only primitive argument types, so the rest of the implementation was handled by stating an appropriate printing format in file "strace.list". Function "regpairs_aligned()" was cut & pasted from "syscall.c" to "qemu.h" as it is used by functions "print_truncate64()" and "print_ftruncate64()" to print the offset arguments of "truncate64()" and "ftruncate64()". Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200811164553.27713-3-Filip.Bozuta@syrmia.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-11 18:45:50 +02:00
{ TARGET_NR_truncate64, "truncate64" , NULL, print_truncate64, NULL },
#endif
#ifdef TARGET_NR_tuxcall
{ TARGET_NR_tuxcall, "tuxcall" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_ugetrlimit
{ TARGET_NR_ugetrlimit, "ugetrlimit" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_ulimit
{ TARGET_NR_ulimit, "ulimit" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_umask
{ TARGET_NR_umask, "umask" , "%s(%#o)", NULL, NULL },
#endif
#ifdef TARGET_NR_umount
{ TARGET_NR_umount, "umount" , NULL, print_umount, NULL },
#endif
#ifdef TARGET_NR_umount2
{ TARGET_NR_umount2, "umount2" , NULL, print_umount2, NULL },
#endif
#ifdef TARGET_NR_uname
{ TARGET_NR_uname, "uname" , "%s(%p)", NULL, NULL },
#endif
#ifdef TARGET_NR_unlink
{ TARGET_NR_unlink, "unlink" , NULL, print_unlink, NULL },
#endif
#ifdef TARGET_NR_unlinkat
{ TARGET_NR_unlinkat, "unlinkat" , NULL, print_unlinkat, NULL },
#endif
#ifdef TARGET_NR_unshare
{ TARGET_NR_unshare, "unshare" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_userfaultfd
{ TARGET_NR_userfaultfd, "userfaultfd" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_unused109
{ TARGET_NR_unused109, "unused109" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_unused150
{ TARGET_NR_unused150, "unused150" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_unused18
{ TARGET_NR_unused18, "unused18" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_unused28
{ TARGET_NR_unused28, "unused28" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_unused59
{ TARGET_NR_unused59, "unused59" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_unused84
{ TARGET_NR_unused84, "unused84" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_uselib
{ TARGET_NR_uselib, "uselib" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_ustat
{ TARGET_NR_ustat, "ustat" , "%s(%#x,%p)", NULL, NULL },
#endif
#ifdef TARGET_NR_utime
{ TARGET_NR_utime, "utime" , NULL, print_utime, NULL },
#endif
#ifdef TARGET_NR_utimes
{ TARGET_NR_utimes, "utimes" , NULL, print_utimes, NULL },
#endif
#ifdef TARGET_NR_utrap_install
{ TARGET_NR_utrap_install, "utrap_install" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_vfork
{ TARGET_NR_vfork, "vfork" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_vhangup
{ TARGET_NR_vhangup, "vhangup" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_vm86
{ TARGET_NR_vm86, "vm86" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_vm86old
{ TARGET_NR_vm86old, "vm86old" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_vmsplice
{ TARGET_NR_vmsplice, "vmsplice" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_vserver
{ TARGET_NR_vserver, "vserver" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_wait4
{ TARGET_NR_wait4, "wait4" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_waitid
{ TARGET_NR_waitid, "waitid" , "%s(%#x,%d,%p,%#x)", NULL, NULL },
#endif
#ifdef TARGET_NR_waitpid
{ TARGET_NR_waitpid, "waitpid" , "%s(%d,%p,%#x)", NULL, NULL },
#endif
#ifdef TARGET_NR_write
{ TARGET_NR_write, "write" , "%s(%d,%#x,%d)", NULL, NULL },
#endif
#ifdef TARGET_NR_writev
{ TARGET_NR_writev, "writev" , "%s(%d,%p,%#x)", NULL, NULL },
#endif
#ifdef TARGET_NR_utimensat
{ TARGET_NR_utimensat, "utimensat", NULL, print_utimensat, NULL },
#endif
#ifdef TARGET_NR_sync_file_range
{ TARGET_NR_sync_file_range, "sync_file_range", NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_sync_file_range2
{ TARGET_NR_sync_file_range2, "sync_file_range2", NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_pipe2
{ TARGET_NR_pipe2, "pipe2", NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_atomic_cmpxchg_32
{ TARGET_NR_atomic_cmpxchg_32, "atomic_cmpxchg_32", NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_atomic_barrier
{ TARGET_NR_atomic_barrier, "atomic_barrier", NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_statx
{ TARGET_NR_statx, "statx", NULL, print_statx, NULL },
#endif