Remove UNDEFINED_SCNO
Since UNDEFINED_SCNO is set if and only if !SCNO_IS_VALID
and since tcp->s_ent can only be set to &sysent[tcp->scno]
(or to &unknown, but only when !SCNO_IS_VALID), there is no need
to check for UNDEFINED_SCNO before calling syscall_name(tcp->scno).
* defs.h (UNDEFINED_SCNO): Remove.
* syscall.c (get_scno, trace_syscall_entering, trace_syscall_exiting):
Remove checks for UNDEFINED_SCNO.
diff --git a/syscall.c b/syscall.c
index e422d87..01e4b31 100644
--- a/syscall.c
+++ b/syscall.c
@@ -770,10 +770,8 @@
printleader(tcp);
if (scno_good != 1)
tprints("????" /* anti-trigraph gap */ "(");
- else if (tcp->qual_flg & UNDEFINED_SCNO)
- tprintf("%s(", syscall_name(tcp->scno));
else
- tprintf("%s(", tcp->s_ent->sys_name);
+ tprintf("%s(", syscall_name(tcp->scno));
/*
* " <unavailable>" will be added later by the code which
* detects ptrace errors.
@@ -832,10 +830,7 @@
#endif
printleader(tcp);
- if (tcp->qual_flg & UNDEFINED_SCNO)
- tprintf("%s(", syscall_name(tcp->scno));
- else
- tprintf("%s(", tcp->s_ent->sys_name);
+ tprintf("%s(", syscall_name(tcp->scno));
if ((tcp->qual_flg & QUAL_RAW) && SEN_exit != tcp->s_ent->sen)
res = printargs(tcp);
else
@@ -896,10 +891,7 @@
if ((followfork < 2 && printing_tcp != tcp) || (tcp->flags & TCB_REPRINT)) {
tcp->flags &= ~TCB_REPRINT;
printleader(tcp);
- if (tcp->qual_flg & UNDEFINED_SCNO)
- tprintf("<... %s resumed> ", syscall_name(tcp->scno));
- else
- tprintf("<... %s resumed> ", tcp->s_ent->sys_name);
+ tprintf("<... %s resumed> ", syscall_name(tcp->scno));
}
printing_tcp = tcp;
@@ -1291,7 +1283,7 @@
.sys_name = "system call",
};
tcp->s_ent = &unknown;
- tcp->qual_flg = UNDEFINED_SCNO | QUAL_RAW | DEFAULT_QUAL_FLAGS;
+ tcp->qual_flg = QUAL_RAW | DEFAULT_QUAL_FLAGS;
if (debug_flag)
error_msg("pid %d invalid syscall %ld", tcp->pid, tcp->scno);
}