Home | History | Annotate | Download | only in strace

Lines Matching refs:tcp

255 sys_prctl(tcp)
256 struct tcb *tcp;
260 if (entering(tcp)) {
261 printxval(prctl_options, tcp->u_arg[0], "PR_???");
262 switch (tcp->u_arg[0]) {
273 tprintf(", %s", unalignctl_string(tcp->u_arg[1]));
278 tprintf(", %#lx", tcp->u_arg[1]);
282 for (i = 1; i < tcp->u_nargs; i++)
283 tprintf(", %#lx", tcp->u_arg[i]);
287 switch (tcp->u_arg[0]) {
290 for (i=1; i<tcp->u_nargs; i++)
291 tprintf(", %#lx", tcp->u_arg[i]);
303 umove(tcp, tcp->u_arg[1], &ctl);
304 tcp->auxstr = unalignctl_string(ctl);
318 sys_gethostid(tcp)
319 struct tcb *tcp;
321 if (exiting(tcp))
327 sys_sethostname(tcp)
328 struct tcb *tcp;
330 if (entering(tcp)) {
331 printpathn(tcp, tcp->u_arg[0], tcp->u_arg[1]);
332 tprintf(", %lu", tcp->u_arg[1]);
338 sys_gethostname(tcp)
339 struct tcb *tcp;
341 if (exiting(tcp)) {
342 if (syserror(tcp))
343 tprintf("%#lx", tcp->u_arg[0]);
345 printpath(tcp, tcp->u_arg[0]);
346 tprintf(", %lu", tcp->u_arg[1]);
352 sys_setdomainname(tcp)
353 struct tcb *tcp;
355 if (entering(tcp)) {
356 printpathn(tcp, tcp->u_arg[0], tcp->u_arg[1]);
357 tprintf(", %lu", tcp->u_arg[1]);
365 sys_getdomainname(tcp)
366 struct tcb *tcp;
368 if (exiting(tcp)) {
369 if (syserror(tcp))
370 tprintf("%#lx", tcp->u_arg[0]);
372 printpath(tcp, tcp->u_arg[0]);
373 tprintf(", %lu", tcp->u_arg[1]);
380 sys_exit(tcp)
381 struct tcb *tcp;
383 if (exiting(tcp)) {
388 tprintf("%ld) ", tcp->u_arg[0]);
391 printtrailer(tcp);
396 internal_exit(tcp)
397 struct tcb *tcp;
399 if (entering(tcp)) {
400 tcp->flags |= TCB_EXITING;
404 if (tcp->scno == 252)
405 tcp->flags |= TCB_GROUP_EXITING;
408 if (known_scno(tcp) == __NR_exit_group)
409 tcp->flags |= TCB_GROUP_EXITING;
415 /* TCP is creating a child we want to follow.
419 fork_tcb(struct tcb *tcp)
423 tcp->flags &= ~TCB_FOLLOWFORK;
428 tcp->flags |= TCB_FOLLOWFORK;
435 sys_fork(tcp)
436 struct tcb *tcp;
438 if (exiting(tcp)) {
439 if (getrval2(tcp)) {
440 tcp->auxstr = "child process";
450 sys_rfork(tcp)
451 struct tcb *tcp;
453 if (entering(tcp)) {
454 tprintf ("%ld", tcp->u_arg[0]);
457 if (getrval2(tcp)) {
458 tcp->auxstr = "child process";
468 internal_fork(tcp)
469 struct tcb *tcp;
473 if (exiting(tcp)) {
475 if (known_scno(tcp) == SYS_rfork && !(tcp->u_arg[0]&RFPROC))
478 if (getrval2(tcp))
482 if (fork_tcb(tcp))
484 if (syserror(tcp))
486 if ((tcpchild = alloctcb(tcp->u_rval)) == NULL) {
554 # define ARG_STACKSIZE (known_scno(tcp) == SYS_clone2 ? 2 : -1)
555 # define ARG_PTID (known_scno(tcp) == SYS_clone2 ? 3 : 2)
556 # define ARG_CTID (known_scno(tcp) == SYS_clone2 ? 4 : 3)
557 # define ARG_TLS (known_scno(tcp) == SYS_clone2 ? 5 : 4)
579 sys_clone(tcp)
580 struct tcb *tcp;
582 if (exiting(tcp)) {
583 unsigned long flags = tcp->u_arg[ARG_FLAGS];
584 tprintf("child_stack=%#lx, ", tcp->u_arg[ARG_STACK]);
588 tcp->u_arg[ARG_STACKSIZE]);
598 tprintf(", parent_tidptr=%#lx", tcp->u_arg[ARG_PTID]);
602 if (umove(tcp, tcp->u_arg[ARG_TLS], &copy) != -1) {
605 if (!verbose(tcp))
612 tprintf(", tls=%#lx", tcp->u_arg[ARG_TLS]);
615 tprintf(", child_tidptr=%#lx", tcp->u_arg[ARG_CTID]);
622 sys_fork(tcp)
623 struct tcb *tcp;
625 if (exiting(tcp))
631 change_syscall(tcp, new)
632 struct tcb *tcp;
638 if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(ORIG_EAX * 4), new) < 0)
643 if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(ORIG_RAX * 8), new) < 0)
647 if (ptrace(PTRACE_POKEUSER, tcp->pid,
653 if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_GPR2), new)<0)
657 if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*PT_ORIG_D0), new)<0)
662 if (ptrace(PTRACE_GETREGS, tcp->pid, (char*)&regs, 0)<0)
665 if (ptrace(PTRACE_SETREGS, tcp->pid, (char*)&regs, 0)<0)
669 if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_V0), new)<0)
673 if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_A3), new)<0)
686 if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_R1), new)<0)
688 } else if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_R15), new)<0)
692 if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_GR20), new)<0)
696 if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*(REG_REG0+3)), new)<0)
702 if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_SYSCALL),
712 if (ptrace (PTRACE_SET_SYSCALL, tcp->pid, 0, new) != 0)
725 setarg(tcp, argnum)
726 struct tcb *tcp;
733 if (upeek(tcp->pid, PT_AR_BSP, (long *) &bsp) , 0)
738 ptrace(PTRACE_POKEDATA, tcp->pid, (char *) ap, tcp->u_arg[argnum]);
745 ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*argnum), tcp->u_arg[argnum]);
751 ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(8*(long)argnum), tcp->u_arg[argnum]);
760 ptrace(PTRACE_POKEUSER, tcp->pid,
762 tcp->u_arg[argnum]);
770 ptrace(PTRACE_POKEUSER, tcp->pid,
771 (char*)(REG_A0 + argnum), tcp->u_arg[argnum]);
775 if (upeek(tcp->pid, REG_SP, (long *) &sp) , 0)
778 ptrace(PTRACE_POKEDATA, tcp->pid,
779 (char*)(sp + argnum - 4), tcp->u_arg[argnum]);
787 ptrace(PTRACE_POKEUSER, tcp->pid,
790 tcp->u_arg[argnum]);
805 internal_clone(tcp)
806 struct tcb *tcp;
810 if (entering(tcp)) {
813 if (fork_tcb(tcp))
815 if (setbpt(tcp) < 0)
818 int bpt = tcp->flags & TCB_BPTSET;
820 if (!(tcp->flags & TCB_FOLLOWFORK))
823 if (syserror(tcp)) {
825 clearbpt(tcp);
829 pid = tcp->u_rval;
841 pid, tcp->pid);
847 clearbpt(tcp);
857 clearbpt(tcp);
866 clearbpt(tcp);
872 tcpchild->baddr = tcp->baddr;
873 memcpy(tcpchild->inst, tcp->inst,
876 tcpchild->parent = tcp;
877 tcp->nchildren++;
893 pid, tcp->pid);
905 * in case we point TCP to our parent below.
907 int call_flags = tcp->u_arg[ARG_FLAGS];
908 if ((tcp->flags & TCB_CLONE_THREAD) &&
909 tcp->parent != NULL) {
920 --tcp->nchildren;
921 tcp = tcp->parent;
922 tcpchild->parent = tcp;
923 ++tcp->nchildren;
927 ++tcp->nclone_threads;
931 ++tcp->nclone_detached;
942 internal_fork(tcp)
943 struct tcb *tcp;
947 return internal_clone(tcp);
955 if (known_scno(tcp) == SYS_vfork) {
958 change_syscall(tcp, SYS_fork) < 0)
962 if (entering(tcp)) {
965 if (fork_tcb(tcp))
967 if (setbpt(tcp) < 0)
971 int bpt = tcp->flags & TCB_BPTSET;
973 if (!(tcp->flags & TCB_FOLLOWFORK))
976 clearbpt(tcp);
978 if (syserror(tcp))
981 pid = tcp->u_rval;
1048 tcpchild->baddr = tcp->baddr;
1049 memcpy(tcpchild->inst, tcp->inst,
1053 tcpchild->parent = tcp;
1054 tcp->nchildren++;
1067 sys_vfork(tcp)
1068 struct tcb *tcp;
1070 if (exiting(tcp))
1082 sys_getpid(tcp)
1083 struct tcb *tcp;
1085 if (exiting(tcp)) {
1086 sprintf(idstr, "ppid %lu", getrval2(tcp));
1087 tcp->auxstr = idstr;
1094 sys_getuid(tcp)
1095 struct tcb *tcp;
1097 if (exiting(tcp)) {
1098 sprintf(idstr, "euid %lu", getrval2(tcp));
1099 tcp->auxstr = idstr;
1106 sys_getgid(tcp)
1107 struct tcb *tcp;
1109 if (exiting(tcp)) {
1110 sprintf(idstr, "egid %lu", getrval2(tcp));
1111 tcp->auxstr = idstr;
1122 sys_setuid(tcp)
1123 struct tcb *tcp;
1125 if (entering(tcp)) {
1126 tprintf("%u", (uid_t) tcp->u_arg[0]);
1132 sys_setgid(tcp)
1133 struct tcb *tcp;
1135 if (entering(tcp)) {
1136 tprintf("%u", (gid_t) tcp->u_arg[0]);
1142 sys_getresuid(tcp)
1143 struct tcb *tcp;
1145 if (exiting(tcp)) {
1147 if (syserror(tcp))
1148 tprintf("%#lx, %#lx, %#lx", tcp->u_arg[0],
1149 tcp->u_arg[1], tcp->u_arg[2]);
1151 if (umove(tcp, tcp->u_arg[0], &uid) < 0)
1152 tprintf("%#lx, ", tcp->u_arg[0]);
1155 if (umove(tcp, tcp->u_arg[1], &uid) < 0)
1156 tprintf("%#lx, ", tcp->u_arg[1]);
1159 if (umove(tcp, tcp->u_arg[2], &uid) < 0)
1160 tprintf("%#lx", tcp->u_arg[2]);
1169 sys_getresgid(tcp)
1170 struct tcb *tcp;
1172 if (exiting(tcp)) {
1174 if (syserror(tcp))
1175 tprintf("%#lx, %#lx, %#lx", tcp->u_arg[0],
1176 tcp->u_arg[1], tcp->u_arg[2]);
1178 if (umove(tcp, tcp->u_arg[0], &gid) < 0)
1179 tprintf("%#lx, ", tcp->u_arg[0]);
1182 if (umove(tcp, tcp->u_arg[1], &gid) < 0)
1183 tprintf("%#lx, ", tcp->u_arg[1]);
1186 if (umove(tcp, tcp->u_arg[2], &gid) < 0)
1187 tprintf("%#lx", tcp->u_arg[2]);
1198 sys_setreuid(tcp)
1199 struct tcb *tcp;
1201 if (entering(tcp)) {
1202 printuid("", tcp->u_arg[0]);
1203 printuid(", ", tcp->u_arg[1]);
1209 sys_setregid(tcp)
1210 struct tcb *tcp;
1212 if (entering(tcp)) {
1213 printuid("", tcp->u_arg[0]);
1214 printuid(", ", tcp->u_arg[1]);
1221 sys_setresuid(tcp)
1222 struct tcb *tcp;
1224 if (entering(tcp)) {
1225 printuid("", tcp->u_arg[0]);
1226 printuid(", ", tcp->u_arg[1]);
1227 printuid(", ", tcp->u_arg[2]);
1232 sys_setresgid(tcp)
1233 struct tcb *tcp;
1235 if (entering(tcp)) {
1236 printuid("", tcp->u_arg[0]);
1237 printuid(", ", tcp->u_arg[1]);
1238 printuid(", ", tcp->u_arg[2]);
1246 sys_setgroups(tcp)
1247 struct tcb *tcp;
1249 if (entering(tcp)) {
1254 len = tcp->u_arg[0];
1260 start = tcp->u_arg[1];
1267 if (!verbose(tcp) || size / sizeof(gid) != len || end < start) {
1271 if (abbrev(tcp)) {
1286 if (umoven(tcp, cur, sizeof(gid), (char *) &gid) < 0) {
1295 tprintf(" %#lx", tcp->u_arg[1]);
1301 sys_getgroups(tcp)
1302 struct tcb *tcp;
1306 if (entering(tcp)) {
1307 len = tcp->u_arg[0];
1314 len = tcp->u_rval;
1319 start = tcp->u_arg[1];
1324 if (tcp->u_arg[0] == 0) {
1330 if (!verbose(tcp) || tcp->u_arg[0] == 0 ||
1335 if (abbrev(tcp)) {
1350 if (umoven(tcp, cur, sizeof(gid), (char *) &gid) < 0) {
1359 tprintf(" %#lx", tcp->u_arg[1]);
1366 sys_setgroups32(tcp)
1367 struct tcb *tcp;
1369 if (entering(tcp)) {
1374 len = tcp->u_arg[0];
1380 start = tcp->u_arg[1];
1387 if (!verbose(tcp) || size / sizeof(gid) != len || end < start) {
1391 if (abbrev(tcp)) {
1406 if (umoven(tcp, cur, sizeof(gid), (char *) &gid) < 0) {
1415 tprintf(" %#lx", tcp->u_arg[1]);
1421 sys_getgroups32(tcp)
1422 struct tcb *tcp;
1426 if (entering(tcp)) {
1427 len = tcp->u_arg[0];
1434 len = tcp->u_rval;
1439 start = tcp->u_arg[1];
1446 if (!verbose(tcp) || tcp->u_arg[0] == 0 ||
1451 if (abbrev(tcp)) {
1466 if (umoven(tcp, cur, sizeof(gid), (char *) &gid) < 0) {
1475 tprintf(" %#lx", tcp->u_arg[1]);
1482 sys_setpgrp(tcp)
1483 struct tcb *tcp;
1485 tcp)) {
1487 tprintf("%lu, %lu", tcp->u_arg[0], tcp->u_arg[1]);
1494 sys_getpgrp(tcp)
1495 struct tcb *tcp;
1497 if (entering(tcp)) {
1499 tprintf("%lu", tcp->u_arg[0]);
1506 sys_getsid(tcp)
1507 struct tcb *tcp;
1509 if (entering(tcp)) {
1510 tprintf("%lu", tcp->u_arg[0]);
1516 sys_setsid(tcp)
1517 struct tcb *tcp;
1523 sys_getpgid(tcp)
1524 struct tcb *tcp;
1526 if (entering(tcp)) {
1527 tprintf("%lu", tcp->u_arg[0]);
1533 sys_setpgid(tcp)
1534 struct tcb *tcp;
1536 if (entering(tcp)) {
1537 tprintf("%lu, %lu", tcp->u_arg[0], tcp->u_arg[1]);
1600 printpriv(tcp, addr, len, opt)
1601 struct tcb *tcp;
1607 int max = verbose (tcp) ? sizeof buf / sizeof buf [0] : 10;
1614 umoven (tcp, addr, len * sizeof buf[0], (char *) buf) < 0)
1644 sys_procpriv(tcp)
1645 struct tcb *tcp;
1647 if (entering(tcp)) {
1648 printxval(procpriv_cmds, tcp->u_arg[0], "???PRV");
1649 switch (tcp->u_arg[0]) {
1651 tprintf(", %#lx, %ld", tcp->u_arg[1], tcp->u_arg[2]);
1659 printpriv (tcp, tcp->u_arg[1], tcp->u_arg[2]);
1660 tprintf (", %ld", tcp->u_arg[2]);
1663 else if (tcp->u_arg[0] == GETPRV) {
1664 if (syserror (tcp)) {
1665 tprintf(", %#lx, %ld", tcp->u_arg[1], tcp->u_arg[2]);
1669 printpriv (tcp, tcp->u_arg[1], tcp->u_rval);
1670 tprintf (", %ld", tcp->u_arg[2]);
1681 printargv(tcp, addr)
1682 struct tcb *tcp;
1690 if (!abbrev(tcp))
1692 if (umove(tcp, addr, &cp) < 0) {
1699 printstr(tcp, (long) cp, -1);
1707 printargc(fmt, tcp, addr)
1709 struct tcb *tcp;
1715 for (count = 0; umove(tcp, addr, &cp) >= 0 && cp != NULL; count++) {
1722 sys_execv(tcp)
1723 struct tcb *tcp;
1725 if (entering(tcp)) {
1726 printpath(tcp, tcp->u_arg[0]);
1727 if (!verbose(tcp))
1728 tprintf(", %#lx", tcp->u_arg[1]);
1730 else if (abbrev(tcp))
1731 printargc(", [/* %d arg%s */]", tcp, tcp->u_arg[1]);
1735 printargv(tcp, tcp->u_arg[1]);
1743 sys_execve(tcp)
1744 struct tcb *tcp;
1746 if (entering(tcp)) {
1747 printpath(tcp, tcp->u_arg[0]);
1748 if (!verbose(tcp))
1749 tprintf(", %#lx", tcp->u_arg[1]);
1751 else if (abbrev(tcp))
1752 printargc(", [/* %d arg%s */]", tcp, tcp->u_arg[1]);
1756 printargv(tcp, tcp->u_arg[1]);
1759 if (!verbose(tcp))
1760 tprintf(", %#lx", tcp->u_arg[2]);
1761 else if (abbrev(tcp))
1762 printargc(", [/* %d var%s */]", tcp, tcp->u_arg[2]);
1765 printargv(tcp, tcp->u_arg[2]);
1774 int sys_rexecve(tcp)
1775 struct tcb *tcp;
1777 if (entering (tcp)) {
1778 sys_execve (tcp);
1779 tprintf (", %ld", tcp->u_arg[3]);
1787 internal_exec(tcp)
1788 struct tcb *tcp;
1791 if (exiting(tcp) && !syserror(tcp) && followfork)
1792 fixvfork(tcp);
1795 if (exiting(tcp) && syserror(tcp))
1796 tcp->flags &= ~TCB_WAITEXECVE;
1798 tcp->flags |= TCB_WAITEXECVE;
1903 printwaitn(tcp, n, bitness)
1904 struct tcb *tcp;
1911 if (entering(tcp)) {
1912 tprintf("%ld, ", tcp->u_arg[0]);
1915 if (!tcp->u_arg[1])
1917 else if (syserror(tcp) || tcp->u_rval == 0)
1918 tprintf("%#lx", tcp->u_arg[1]);
1919 else if (umove(tcp, tcp->u_arg[1], &status) < 0)
1925 printflags(wait4_options, tcp->u_arg[2], "W???");
1929 if (!tcp->u_arg[3])
1932 else if (tcp->u_rval > 0) {
1935 printrusage32(tcp, tcp->u_arg[3]);
1938 printrusage(tcp, tcp->u_arg[3]);
1942 else if (tcp->u_rval > 0 && exited)
1943 printrusage(tcp, tcp->u_arg[3]);
1946 tprintf("%#lx", tcp->u_arg[3]);
1953 internal_wait(tcp, flagarg)
1954 struct tcb *tcp;
1960 if (tcp->flags & TCB_CLONE_THREAD)
1962 got_kids = (tcp->parent->nchildren
1963 > tcp->parent->nclone_detached);
1965 got_kids = (tcp->nchildren > tcp->nclone_detached);
1967 got_kids = tcp->nchildren > 0;
1970 if (entering(tcp) && got_kids) {
1981 if (!(tcp->u_arg[flagarg] & WNOHANG)) {
1990 if (tcp->nzombies > 0 &&
1991 (tcp->u_arg[0] == -1 ||
1992 (child = pid2tcb(tcp->u_arg[0])) == NULL))
1994 if (tcp->u_arg[0] > 0) {
2004 child = pid2tcb(tcp->u_arg[0]);
2007 (tcp->flags & TCB_CLONE_THREAD)
2008 ? tcp->parent :
2010 tcp))
2013 tcp->flags |= TCB_SUSPENDED;
2014 tcp->waitpid = tcp->u_arg[0];
2016 if (tcp->flags & TCB_CLONE_THREAD)
2017 tcp->parent->nclone_waiting++;
2021 if (exiting(tcp) && tcp->u_error == ECHILD && got_kids) {
2022 if (tcp->u_arg[flagarg] & WNOHANG) {
2026 return force_result(tcp, 0, 0);
2029 else if (exiting(tcp) && tcp->u_error == 0 && tcp->u_rval > 0 &&
2030 tcp->nzombies > 0 && pid2tcb(tcp->u_rval) == NULL) {
2035 tcp->nzombies--;
2043 sys_wait(tcp)
2044 struct tcb *tcp;
2046 if (exiting(tcp)) {
2048 if (!syserror(tcp))
2049 printstatus(getrval2(tcp));
2058 sys_wait(tcp)
2059 struct tcb *tcp;
2063 if (exiting(tcp)) {
2064 if (!syserror(tcp)) {
2065 if (umove(tcp, tcp->u_arg[0], &status) < 0)
2066 tprintf("%#lx", tcp->u_arg[0]);
2076 sys_waitpid(tcp)
2077 struct tcb *tcp;
2079 return printwaitn(tcp, 3, 0);
2083 sys_wait4(tcp)
2084 struct tcb *tcp;
2086 return printwaitn(tcp, 4, 0);
2091 sys_osf_wait4(tcp)
2092 struct tcb *tcp;
2094 return printwaitn(tcp, 4, 1);
2126 sys_waitid(tcp)
2127 struct tcb *tcp;
2132 if (entering(tcp)) {
2133 printxval(waitid_types, tcp->u_arg[0], "P_???");
2134 tprintf(", %ld, ", tcp->u_arg[1]);
2139 if (!tcp->u_arg[2])
2141 else if (syserror(tcp))
2142 tprintf("%#lx", tcp->u_arg[2]);
2143 else if (umove(tcp, tcp->u_arg[2], &si) < 0)
2146 printsiginfo(&si, verbose (tcp));
2149 printflags(wait4_options, tcp->u_arg[3], "W???");
2150 if (tcp->u_nargs > 4) {
2153 if (!tcp->u_arg[4])
2155 else if (tcp->u_error)
2156 tprintf("%#lx", tcp->u_arg[4]);
2158 printrusage(tcp, tcp->u_arg[4]);
2167 sys_alarm(tcp)
2168 struct tcb *tcp;
2170 if (entering(tcp))
2171 tprintf("%lu", tcp->u_arg[0]);
2176 sys_uname(tcp)
2177 struct tcb *tcp;
2181 if (exiting(tcp)) {
2182 if (syserror(tcp) || !verbose(tcp))
2183 tprintf("%#lx", tcp->u_arg[0]);
2184 else if (umove(tcp, tcp->u_arg[0], &uname) < 0)
2186 else if (!abbrev(tcp)) {
2984 sys_ptrace(tcp)
2985 struct tcb *tcp;
2990 if (entering(tcp)) {
2991 printxval(ptrace_cmds, tcp->u_arg[0],
2998 tprintf(", %lu, ", tcp->u_arg[1]);
2999 addr = tcp->u_arg[2];
3001 if (tcp->u_arg[0] == PTRACE_PEEKUSER
3002 || tcp->u_arg[0] == PTRACE_POKEUSER) {
3018 tprintf("%#lx, ", tcp->u_arg[2]);
3020 switch (tcp->u_arg[0]) {
3029 printsignal(tcp->u_arg[3]);
3032 tprintf("%#lx", tcp->u_arg[3]);
3036 switch (tcp->u_arg[0]) {
3040 printnum(tcp, tcp->u_arg[3], "%#lx");
3046 if (tcp->u_arg[0] == PTRACE_WRITEDATA ||
3047 tcp->u_arg[0] == PTRACE_WRITETEXT) {
3048 tprintf("%lu, ", tcp->u_arg[3]);
3049 printstr(tcp, tcp->u_arg[4], tcp->u_arg[3]);
3050 } else if (tcp->u_arg[0] != PTRACE_READDATA &&
3051 tcp->u_arg[0] != PTRACE_READTEXT) {
3052 tprintf("%#lx", tcp->u_arg[3]);
3055 if (tcp->u_arg[0] == PTRACE_READDATA ||
3056 tcp->u_arg[0] == PTRACE_READTEXT) {
3057 tprintf("%lu, ", tcp->u_arg[3]);
3058 printstr(tcp, tcp->u_arg[4], tcp->u_arg[3]);
3063 tprintf("%lu", tcp->u_arg[3]);
3081 sys_futex(tcp)
3082 struct tcb *tcp;
3084 if (entering(tcp)) {
3085 tprintf("%p, ", (void *) tcp->u_arg[0]);
3086 printxval(futexops, tcp->u_arg[1], "FUTEX_???");
3087 tprintf(", %ld", tcp->u_arg[2]);
3088 if (tcp->u_arg[1] == FUTEX_WAIT) {
3090 printtv(tcp, tcp->u_arg[3]);
3091 } else if (tcp->u_arg[1] == FUTEX_REQUEUE)
3092 tprintf(", %ld, %p", tcp->u_arg[3], (void *) tcp->u_arg[4]);
3098 print_affinitylist(tcp, list, len)
3099 struct tcb *tcp;
3107 umove(tcp, list, &w);
3117 sys_sched_setaffinity(tcp)
3118 struct tcb *tcp;
3120 if (entering(tcp)) {
3121 tprintf("%ld, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
3122 print_affinitylist(tcp, tcp->u_arg[2], tcp->u_arg[1]);
3128 sys_sched_getaffinity(tcp)
3129 struct tcb *tcp;
3131 if (entering(tcp)) {
3132 tprintf("%ld, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
3134 if (tcp->u_rval == -1)
3135 tprintf("%#lx", tcp->u_arg[2]);
3137 print_affinitylist(tcp, tcp->u_arg[2], tcp->u_rval);
3150 sys_sched_getscheduler(tcp)
3151 struct tcb *tcp;
3153 if (entering(tcp)) {
3154 tprintf("%d", (int) tcp->u_arg[0]);
3155 } else if (! syserror(tcp)) {
3156 tcp->auxstr = xlookup (schedulers, tcp->u_rval);
3157 if (tcp->auxstr != NULL)
3164 sys_sched_setscheduler(tcp)
3165 struct tcb *tcp;
3167 if (entering(tcp)) {
3169 tprintf("%d, ", (int) tcp->u_arg[0]);
3170 printxval(schedulers, tcp->u_arg[1], "SCHED_???");
3171 if (umove(tcp, tcp->u_arg[2], &p) < 0)
3172 tprintf(", %#lx", tcp->u_arg[2]);
3180 sys_sched_getparam(tcp)
3181 struct tcb *tcp;
3183 if (entering(tcp)) {
3184 tprintf("%d, ", (int) tcp->u_arg[0]);
3187 if (umove(tcp, tcp->u_arg[1], &p) < 0)
3188 tprintf("%#lx", tcp->u_arg[1]);
3196 sys_sched_setparam(tcp)
3197 struct tcb *tcp;
3199 if (entering(tcp)) {
3201 if (umove(tcp, tcp->u_arg[1], &p) < 0)
3202 tprintf("%d, %#lx", (int) tcp->u_arg[0], tcp->u_arg[1]);
3204 tprintf("%d, { %d }", (int) tcp->u_arg[0], p.__sched_priority);
3210 sys_sched_get_priority_min(tcp)
3211 struct tcb *tcp;
3213 if (entering(tcp)) {
3214 printxval(schedulers, tcp->u_arg[0], "SCHED_???");
3231 sys_arch_prctl(tcp)
3232 struct tcb *tcp;
3234 if (entering(tcp)) {
3235 printxval(archvals, tcp->u_arg[0], "ARCH_???");
3236 if (tcp->u_arg[0] == ARCH_SET_GS
3237 || tcp->u_arg[0] == ARCH_SET_FS)
3238 tprintf(", %#lx", tcp->u_arg[1]);
3240 if (tcp->u_arg[0] == ARCH_GET_GS
3241 || tcp->u_arg[0] == ARCH_GET_FS) {
3243 if (!syserror(tcp) && umove(tcp, tcp->u_arg[1], &v) != -1)
3246 tprintf(", %#lx", tcp->u_arg[1]);