diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2012-03-11 22:32:26 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2012-03-11 22:32:26 +0000 |
commit | 1b0bae2969abe21c388144761bc52e3ae9d1a043 (patch) | |
tree | 89320787c39d52b36959fe46f14d91155d7b98bc /process.c | |
parent | 1e8ed076ceebb1558de5952c6d79e5155145fde3 (diff) | |
download | strace-1b0bae2969abe21c388144761bc52e3ae9d1a043.tar.gz strace-1b0bae2969abe21c388144761bc52e3ae9d1a043.tar.bz2 strace-1b0bae2969abe21c388144761bc52e3ae9d1a043.tar.xz |
Implement get_robust_list syscall decoder
* linux/dummy.h (sys_get_robust_list): Remove.
* linux/syscall.h (sys_get_robust_list): New prototype.
* process.c (sys_get_robust_list): New function.
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -2617,6 +2617,34 @@ sys_sched_getaffinity(struct tcb *tcp) return 0; } +int +sys_get_robust_list(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", (long) (pid_t) tcp->u_arg[0]); + } else { + void *addr; + size_t len; + + if (syserror(tcp) || + !tcp->u_arg[1] || + umove(tcp, tcp->u_arg[1], &addr) < 0) { + tprintf("%#lx, ", tcp->u_arg[1]); + } else { + tprintf("[%p], ", addr); + } + + if (syserror(tcp) || + !tcp->u_arg[2] || + umove(tcp, tcp->u_arg[2], &len) < 0) { + tprintf("%#lx", tcp->u_arg[2]); + } else { + tprintf("[%lu]", (unsigned long) len); + } + } + return 0; +} + static const struct xlat schedulers[] = { { SCHED_OTHER, "SCHED_OTHER" }, { SCHED_RR, "SCHED_RR" }, |