Lines Matching refs:tcp
298 copy_sigset_len(tcp, addr, s, len)
299 struct tcb *tcp;
307 if (umoven(tcp, addr, len, (char *)s) < 0)
314 #define copy_sigset(tcp, addr, s) copy_sigset_len(tcp, addr, s, sizeof(long))
316 #define copy_sigset(tcp, addr, s) copy_sigset_len(tcp, addr, s, sizeof(sigset_t))
818 * Check process TCP for the disposition of signal SIG.
823 sigishandled(tcp, sig)
824 struct tcb *tcp;
866 sprintf(sname, "/proc/%d/status", tcp->pid);
905 if (upeek(tcp->pid, uoff(u_signal[0]) + sig*sizeof(u_signal),
919 sys_sigvec(tcp)
920 struct tcb *tcp;
925 if (entering(tcp)) {
926 printsignal(tcp->u_arg[0]);
928 addr = tcp->u_arg[1];
930 addr = tcp->u_arg[2];
934 else if (!verbose(tcp))
936 else if (umove(tcp, addr, &sv) < 0)
947 if (tcp->u_arg[0] == SIGTRAP) {
948 tcp->flags |= TCB_SIGTRAPPED;
949 kill(tcp->pid, SIGSTOP);
954 if (tcp->u_arg[0] == SIGTRAP) {
955 tcp->flags |= TCB_SIGTRAPPED;
956 kill(tcp->pid, SIGSTOP);
961 if (tcp->u_arg[0] == SIGTRAP) {
962 tcp->flags |= TCB_SIGTRAPPED;
963 kill(tcp->pid, SIGSTOP);
972 if (entering(tcp))
978 sys_sigpause(tcp)
979 struct tcb *tcp;
981 if (entering(tcp)) { /* WTA: UD had a bug here: he forgot the braces */
983 long_to_sigset(tcp->u_arg[0], &sigm);
990 sys_sigstack(tcp)
991 struct tcb *tcp;
996 if (entering(tcp))
997 addr = tcp->u_arg[0];
999 addr = tcp->u_arg[1];
1002 else if (umove(tcp, addr, &ss) < 0)
1008 if (entering(tcp))
1014 sys_sigcleanup(tcp)
1015 struct tcb *tcp;
1025 sys_sigsetmask(tcp)
1026 struct tcb *tcp;
1028 if (entering(tcp)) {
1030 long_to_sigset(tcp->u_arg[0], &sigm);
1038 if ((tcp->u_arg[0] & sigmask(SIGTRAP))) {
1040 tcp->flags |= TCB_SIGTRAPPED;
1042 kill(tcp->pid, SIGSTOP);
1046 else if (!syserror(tcp)) {
1048 long_to_sigset(tcp->u_rval, &sigm);
1049 tcp->auxstr = sprintsigmask("old mask ", &sigm, 0);
1057 sys_sigblock(tcp)
1058 struct tcb *tcp;
1060 return sys_sigsetmask(tcp);
1082 sys_sigaction(tcp)
1083 struct tcb *tcp;
1094 if (entering(tcp)) {
1095 printsignal(tcp->u_arg[0]);
1097 addr = tcp->u_arg[1];
1099 addr = tcp->u_arg[2];
1102 else if (!verbose(tcp))
1104 else if (umove(tcp, addr, &sa) < 0)
1116 if (tcp->u_arg[0] == SIGTRAP) {
1117 tcp->flags |= TCB_SIGTRAPPED;
1118 kill(tcp->pid, SIGSTOP);
1125 if (tcp->u_arg[0] == SIGTRAP) {
1126 tcp->flags |= TCB_SIGTRAPPED;
1127 kill(tcp->pid, SIGSTOP);
1146 if (entering(tcp))
1156 sys_signal(tcp)
1157 struct tcb *tcp;
1159 if (entering(tcp)) {
1160 printsignal(tcp->u_arg[0]);
1162 switch (tcp->u_arg[1]) {
1171 if (tcp->u_arg[0] == SIGTRAP) {
1172 tcp->flags |= TCB_SIGTRAPPED;
1173 kill(tcp->pid, SIGSTOP);
1180 if (tcp->u_arg[0] == SIGTRAP) {
1181 tcp->flags |= TCB_SIGTRAPPED;
1182 kill(tcp->pid, SIGSTOP);
1185 tprintf("%#lx", tcp->u_arg[1]);
1190 switch (tcp->u_rval) {
1192 tcp->auxstr = "SIG_ERR"; break;
1194 tcp->auxstr = "SIG_DFL"; break;
1196 tcp->auxstr = "SIG_IGN"; break;
1198 tcp->auxstr = NULL;
1205 sys_sighold(tcp)
1206 struct tcb *tcp;
1208 if (entering(tcp)) {
1209 printsignal(tcp->u_arg[0]);
1223 sys_sigreturn(tcp)
1224 struct tcb *tcp;
1230 if (entering(tcp)) {
1231 tcp->u_arg[0] = 0;
1233 if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (void *)®s) == -1)
1236 if (umove(tcp, regs.ARM_sp, &sc) < 0)
1239 tcp->u_arg[0] = 1;
1240 tcp->u_arg[1] = sc.oldmask;
1243 long_to_sigset(tcp->u_arg[1], &sigm);
1244 tcp->u_rval = tcp->u_error = 0;
1245 if (tcp->u_arg[0] == 0)
1247 tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
1255 if (entering(tcp)) {
1256 tcp->u_arg[0] = 0;
1257 if (upeek(tcp->pid,PT_GPR15,&usp)<0)
1259 if (umove(tcp, usp+__SIGNAL_FRAMESIZE, &sc) < 0)
1261 tcp->u_arg[0] = 1;
1262 memcpy(&tcp->u_arg[1],&sc.oldmask[0],sizeof(sigset_t));
1264 tcp->u_rval = tcp->u_error = 0;
1265 if (tcp->u_arg[0] == 0)
1267 tcp->auxstr = sprintsigmask("mask now ",(sigset_t *)&tcp->u_arg[1],0);
1276 if (entering(tcp)) {
1277 tcp->u_arg[0] = 0;
1278 if (upeek(tcp->pid, 4*UESP, &esp) < 0)
1280 if (umove(tcp, esp, &sc) < 0)
1282 tcp->u_arg[0] = 1;
1283 tcp->u_arg[1] = sc.oldmask;
1287 long_to_sigset(tcp->u_arg[1], &sigm);
1288 tcp->u_rval = tcp->u_error = 0;
1289 if (tcp->u_arg[0] == 0)
1291 tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
1300 if (entering(tcp)) {
1303 tcp->u_arg[0] = 0;
1304 if (upeek(tcp->pid, PT_R12, &sp) < 0)
1306 if (umove(tcp, sp + 16 + SIGFRAME_SC_OFFSET, &sc) < 0)
1308 tcp->u_arg[0] = 1;
1309 memcpy(tcp->u_arg + 1, &sc.sc_mask, sizeof(sc.sc_mask));
1314 memcpy(&sigm, tcp->u_arg + 1, sizeof (sigm));
1315 tcp->u_rval = tcp->u_error = 0;
1316 if (tcp->u_arg[0] == 0)
1318 tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
1327 if (entering(tcp)) {
1328 tcp->u_arg[0] = 0;
1329 if (upeek(tcp->pid, sizeof(unsigned long)*PT_R1, &esp) < 0)
1331 if (umove(tcp, esp, &sc) < 0)
1333 tcp->u_arg[0] = 1;
1334 tcp->u_arg[1] = sc.oldmask;
1338 long_to_sigset(tcp->u_arg[1], &sigm);
1339 tcp->u_rval = tcp->u_error = 0;
1340 if (tcp->u_arg[0] == 0)
1342 tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
1351 if (entering(tcp)) {
1352 tcp->u_arg[0] = 0;
1353 if (upeek(tcp->pid, 4*PT_USP, &usp) < 0)
1355 if (umove(tcp, usp, &sc) < 0)
1357 tcp->u_arg[0] = 1;
1358 tcp->u_arg[1] = sc.sc_mask;
1362 long_to_sigset(tcp->u_arg[1], &sigm);
1363 tcp->u_rval = tcp->u_error = 0;
1364 if (tcp->u_arg[0] == 0)
1366 tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
1375 if (entering(tcp)) {
1376 tcp->u_arg[0] = 0;
1377 if (upeek(tcp->pid, REG_FP, &fp) < 0)
1379 if (umove(tcp, fp, &sc) < 0)
1381 tcp->u_arg[0] = 1;
1382 tcp->u_arg[1] = sc.sc_mask;
1386 long_to_sigset(tcp->u_arg[1], &sigm);
1387 tcp->u_rval = tcp->u_error = 0;
1388 if (tcp->u_arg[0] == 0)
1390 tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
1400 if(ptrace(PTRACE_GETREGS, tcp->pid, (char *)®s, 0) < 0) {
1404 if(entering(tcp)) {
1405 tcp->u_arg[0] = 0;
1407 if(umove(tcp, i1, &si) < 0) {
1411 tcp->u_arg[0] = 1;
1412 tcp->u_arg[1] = si.si_mask;
1415 long_to_sigset(tcp->u_arg[1], &sigm);
1416 tcp->u_rval = tcp->u_error = 0;
1417 if(tcp->u_arg[0] == 0)
1419 tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
1428 if(entering(tcp)) {
1429 tcp->u_arg[0] = 0;
1430 if (upeek(tcp->pid, REG_SP, &sp) < 0)
1432 if (umove(tcp, sp, &sc) < 0)
1434 tcp->u_arg[0] = 1;
1435 tcp->u_arg[1] = sc.sc_sigset;
1437 tcp->u_rval = tcp->u_error = 0;
1438 if(tcp->u_arg[0] == 0)
1440 tcp->auxstr = sprintsigmask("mask now ", tcp->u_arg[1]);
1459 sys_siggetmask(tcp)
1460 struct tcb *tcp;
1462 if (exiting(tcp)) {
1464 long_to_sigset(tcp->u_rval, &sigm);
1465 tcp->auxstr = sprintsigmask("mask ", &sigm, 0);
1471 sys_sigsuspend(tcp)
1472 struct tcb *tcp;
1474 if (entering(tcp)) {
1476 long_to_sigset(tcp->u_arg[2], &sigm);
1480 tprintf("%d, %#x, ", tcp->u_arg[0], tcp->u_arg[1]);
1493 sys_sigsuspend(tcp)
1494 struct tcb *tcp;
1498 if (entering(tcp)) {
1499 if (umove(tcp, tcp->u_arg[0], &sigset) < 0)
1548 printcontext(tcp, ucp)
1549 struct tcb *tcp;
1553 if (!abbrev(tcp)) {
1560 if (!abbrev(tcp)) {
1571 sys_getcontext(tcp)
1572 struct tcb *tcp;
1576 if (exiting(tcp)) {
1577 if (tcp->u_error)
1578 tprintf("%#lx", tcp->u_arg[0]);
1579 else if (!tcp->u_arg[0])
1581 else if (umove(tcp, tcp->u_arg[0], &uc) < 0)
1584 printcontext(tcp, &uc);
1590 sys_setcontext(tcp)
1591 struct tcb *tcp;
1595 if (entering(tcp)) {
1596 if (!tcp->u_arg[0])
1598 else if (umove(tcp, tcp->u_arg[0], &uc) < 0)
1601 printcontext(tcp, &uc);
1604 tcp->u_rval = tcp->u_error = 0;
1605 if (tcp->u_arg[0] == 0)
1617 print_stack_t(tcp, addr)
1618 struct tcb *tcp;
1622 if (umove(tcp, addr, &ss) < 0)
1631 sys_sigaltstack(tcp)
1632 struct tcb *tcp;
1634 if (entering(tcp)) {
1635 if (tcp->u_arg[0] == 0)
1637 else if (print_stack_t(tcp, tcp->u_arg[0]) < 0)
1642 if (tcp->u_arg[1] == 0)
1644 else if (print_stack_t(tcp, tcp->u_arg[1]) < 0)
1654 sys_sigprocmask(tcp)
1655 struct tcb *tcp;
1658 if (entering(tcp)) {
1659 printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???");
1661 printsigmask(tcp->u_arg[1], 0);
1663 else if (!syserror(tcp)) {
1664 tcp->auxstr = sprintsigmask("old mask ", tcp->u_rval, 0);
1670 if (entering(tcp)) {
1672 if (tcp->u_arg[0] == 0)
1676 printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???");
1678 if (!tcp->u_arg[1])
1680 else if (copy_sigset(tcp, tcp->u_arg[1], &sigset) < 0)
1681 tprintf("%#lx, ", tcp->u_arg[1]);
1688 if (!tcp->u_arg[2])
1690 else if (syserror(tcp))
1691 tprintf("%#lx", tcp->u_arg[2]);
1692 else if (copy_sigset(tcp, tcp->u_arg[2], &sigset) < 0)
1704 sys_kill(tcp)
1705 struct tcb *tcp;
1707 if (entering(tcp)) {
1708 tprintf("%ld, %s", tcp->u_arg[0], signame(tcp->u_arg[1]));
1714 sys_killpg(tcp)
1715 struct tcb *tcp;
1717 return sys_kill(tcp);
1722 sys_tgkill(tcp)
1723 struct tcb *tcp;
1725 if (entering(tcp)) {
1727 tcp->u_arg[0], tcp->u_arg[1], signame(tcp->u_arg[2]));
1734 sys_sigpending(tcp)
1735 struct tcb *tcp;
1739 if (exiting(tcp)) {
1740 if (syserror(tcp))
1741 tprintf("%#lx", tcp->u_arg[0]);
1742 else if (copy_sigset(tcp, tcp->u_arg[0], &sigset) < 0)
1750 int sys_sigwait(tcp)
1751 struct tcb *tcp;
1755 if (entering(tcp)) {
1756 if (copy_sigset(tcp, tcp->u_arg[0], &sigset) < 0)
1762 if (!syserror(tcp)) {
1763 tcp->auxstr = signalent[tcp->u_rval];
1773 sys_rt_sigprocmask(tcp)
1774 struct tcb *tcp;
1779 if (entering(tcp)) {
1780 printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???");
1782 if (!tcp->u_arg[1])
1784 else if (copy_sigset_len(tcp, tcp->u_arg[1], &sigset, tcp->u_arg[3]) < 0)
1785 tprintf("%#lx, ", tcp->u_arg[1]);
1792 if (!tcp->u_arg[2])
1795 else if (syserror(tcp))
1796 tprintf("%#lx", tcp->u_arg[2]);
1797 else if (copy_sigset_len(tcp, tcp->u_arg[2], &sigset, tcp->u_arg[3]) < 0)
1801 tprintf(", %lu", tcp->u_arg[3]);
1823 sys_rt_sigaction(tcp)
1824 struct tcb *tcp;
1830 if (entering(tcp)) {
1831 printsignal(tcp->u_arg[0]);
1833 addr = tcp->u_arg[1];
1835 addr = tcp->u_arg[2];
1838 else if (!verbose(tcp))
1840 else if (umove(tcp, addr, &sa) < 0)
1858 if (tcp->u_arg[4] <= sizeof(sigset))
1859 memcpy(&sigset, &sa.sa_mask, tcp->u_arg[4]);
1861 if (tcp->u_arg[3] <= sizeof(sigset))
1862 memcpy(&sigset, &sa.sa_mask, tcp->u_arg[3]);
1876 if (entering(tcp))
1880 tprintf(", %#lx, %lu", tcp->u_arg[3], tcp->u_arg[4]);
1882 tprintf(", %lu, %#lx", tcp->u_arg[3], tcp->u_arg[4]);
1884 tprintf(", %lu", addr = tcp->u_arg[3]);
1890 sys_rt_sigpending(tcp)
1891 struct tcb *tcp;
1895 if (exiting(tcp)) {
1896 if (syserror(tcp))
1897 tprintf("%#lx", tcp->u_arg[0]);
1898 else if (copy_sigset_len(tcp, tcp->u_arg[0],
1899 &sigset, tcp->u_arg[1]) < 0)
1907 sys_rt_sigsuspend(tcp)
1908 struct tcb *tcp;
1910 if (entering(tcp)) {
1912 if (copy_sigset_len(tcp, tcp->u_arg[0], &sigm, tcp->u_arg[1]) < 0)
1920 sys_rt_sigqueueinfo(tcp)
1921 struct tcb *tcp;
1923 if (entering(tcp)) {
1925 tprintf("%lu, ", tcp->u_arg[0]);
1926 printsignal(tcp->u_arg[1]);
1928 if (umove(tcp, tcp->u_arg[2], &si) < 0)
1929 tprintf("%#lx", tcp->u_arg[2]);
1931 printsiginfo(&si, verbose (tcp));
1936 int sys_rt_sigtimedwait(tcp)
1937 struct tcb *tcp;
1939 if (entering(tcp)) {
1942 if (copy_sigset_len(tcp, tcp->u_arg[0],
1943 &sigset, tcp->u_arg[3]) < 0)
1950 if (syserror(tcp))
1951 tprintf("%#lx", tcp->u_arg[0]);
1954 if (umove(tcp, tcp->u_arg[1], &si) < 0)
1955 tprintf("%#lx", tcp->u_arg[1]);
1957 printsiginfo(&si, verbose (tcp));
1959 tprintf(", %#lx", tcp->u_arg[2]);
1960 tprintf(", %d", (int) tcp->u_arg[3]);