mips_r2 = regs[REG_V0];
scno = mips_r2;
- if (!SCNO_IN_RANGE(scno)) {
+ if (!SCNO_IS_VALID(scno)) {
if (mips_a3 == 0 || mips_a3 == -1) {
if (debug_flag)
fprintf(stderr, "stray syscall exit: v0 = %ld\n", scno);
if (upeek(tcp, REG_V0, &scno) < 0)
return -1;
- if (!SCNO_IN_RANGE(scno)) {
+ if (!SCNO_IS_VALID(scno)) {
if (mips_a3 == 0 || mips_a3 == -1) {
if (debug_flag)
fprintf(stderr, "stray syscall exit: v0 = %ld\n", scno);
* Do some sanity checks to figure out if it's
* really a syscall entry
*/
- if (!SCNO_IN_RANGE(scno)) {
+ if (!SCNO_IS_VALID(scno)) {
if (alpha_a3 == 0 || alpha_a3 == -1) {
if (debug_flag)
fprintf(stderr, "stray syscall exit: r0 = %ld\n", scno);
*/
int (*func)();
- if (!SCNO_IN_RANGE(tcp->scno))
+ if (!SCNO_IS_VALID(tcp->scno))
return;
func = sysent[tcp->scno].sys_func;
{
int i, nargs;
- if (SCNO_IN_RANGE(tcp->scno))
+ if (SCNO_IS_VALID(tcp->scno))
nargs = tcp->u_nargs = sysent[tcp->scno].nargs;
else
nargs = tcp->u_nargs = MAX_ARGS;
printleader(tcp);
if (scno_good != 1)
tprints("????" /* anti-trigraph gap */ "(");
- else if (!SCNO_IN_RANGE(tcp->scno))
+ else if (!SCNO_IS_VALID(tcp->scno))
tprintf("syscall_%lu(", tcp->scno);
else
tprintf("%s(", sysent[tcp->scno].sys_name);
}
#if defined(SYS_socket_subcall) || defined(SYS_ipc_subcall)
- while (SCNO_IN_RANGE(tcp->scno)) {
+ while (SCNO_IS_VALID(tcp->scno)) {
# ifdef SYS_socket_subcall
if (sysent[tcp->scno].sys_func == sys_socketcall) {
decode_socket_subcall(tcp);
if (need_fork_exec_workarounds)
syscall_fixup_for_fork_exec(tcp);
- if ((SCNO_IN_RANGE(tcp->scno) &&
+ if ((SCNO_IS_VALID(tcp->scno) &&
!(qual_flags[tcp->scno] & QUAL_TRACE)) ||
(tracing_paths && !pathtrace_match(tcp))) {
tcp->flags |= TCB_INSYSCALL | TCB_FILTERED;
}
printleader(tcp);
- if (!SCNO_IN_RANGE(tcp->scno))
+ if (!SCNO_IS_VALID(tcp->scno))
tprintf("syscall_%lu(", tcp->scno);
else
tprintf("%s(", sysent[tcp->scno].sys_name);
- if (!SCNO_IN_RANGE(tcp->scno) ||
+ if (!SCNO_IS_VALID(tcp->scno) ||
((qual_flags[tcp->scno] & QUAL_RAW) &&
sysent[tcp->scno].sys_func != sys_exit))
res = printargs(tcp);
{
int u_error = 0;
int check_errno = 1;
- if (SCNO_IN_RANGE(tcp->scno) &&
- sysent[tcp->scno].sys_flags & SYSCALL_NEVER_FAILS) {
+ if (SCNO_IS_VALID(tcp->scno)
+ && (sysent[tcp->scno].sys_flags & SYSCALL_NEVER_FAILS)
+ ) {
check_errno = 0;
}
#if defined(S390) || defined(S390X)
return;
if (tcp->u_arg[0] < 0 || tcp->u_arg[0] >= MAX_QUALS)
return;
- if (!SCNO_IN_RANGE(tcp->scno))
+ if (!SCNO_IS_VALID(tcp->scno))
return;
if (sysent[tcp->scno].sys_func == printargs)
return;
if ((followfork < 2 && printing_tcp != tcp) || (tcp->flags & TCB_REPRINT)) {
tcp->flags &= ~TCB_REPRINT;
printleader(tcp);
- if (!SCNO_IN_RANGE(tcp->scno))
+ if (!SCNO_IS_VALID(tcp->scno))
tprintf("<... syscall_%lu resumed> ", tcp->scno);
else
tprintf("<... %s resumed> ", sysent[tcp->scno].sys_name);
}
sys_res = 0;
- if (!SCNO_IN_RANGE(tcp->scno)
+ if (!SCNO_IS_VALID(tcp->scno)
|| (qual_flags[tcp->scno] & QUAL_RAW)) {
/* sys_res = printargs(tcp); - but it's nop on sysexit */
} else {
tprints(") ");
tabto();
u_error = tcp->u_error;
- if (!SCNO_IN_RANGE(tcp->scno) ||
+ if (!SCNO_IS_VALID(tcp->scno) ||
qual_flags[tcp->scno] & QUAL_RAW) {
if (u_error)
tprintf("= -1 (errno %ld)", u_error);