strace/get_robust_list.c
Dmitry V. Levin 8357638568 process.c: move get_robust_list parser to a separate file
* get_robust_list.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c (sys_get_robust_list): Move to get_robust_list.c.
2014-12-11 19:25:02 +00:00

30 lines
547 B
C

#include "defs.h"
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;
}