* defs.h (SCNO_IN_RANGE): Rename to scno_in_range. All callers updated.
(SCNO_IS_VALID): Rename to scno_is_valid. All callers updated.
struct timeval wtv;
struct timeval *tv = &wtv;
struct call_counts *cc;
- unsigned long scno = tcp->scno;
- if (!SCNO_IN_RANGE(scno))
+ if (!scno_in_range(tcp->scno))
return;
if (!counts)
counts = xcalloc(nsyscalls, sizeof(*counts));
- cc = &counts[scno];
+ cc = &counts[tcp->scno];
cc->calls++;
if (syserror(tcp))
/* Checks that sysent[scno] is not out of range. */
static inline bool
-SCNO_IN_RANGE(unsigned long scno)
+scno_in_range(unsigned long scno)
{
return scno < nsyscalls;
}
* and its sysent[scno].sys_flags has no TRACE_INDIRECT_SUBCALL flag set.
*/
static inline bool
-SCNO_IS_VALID(unsigned long scno)
+scno_is_valid(unsigned long scno)
{
- return SCNO_IN_RANGE(scno)
+ return scno_in_range(scno)
&& sysent[scno].sys_func
&& !(sysent[scno].sys_flags & TRACE_INDIRECT_SUBCALL);
}
* Do some sanity checks to figure out if it's
* really a syscall entry
*/
- if (!SCNO_IN_RANGE(scno)) {
+ if (!scno_in_range(scno)) {
if (alpha_a3 == 0 || alpha_a3 == -1) {
if (debug_flag)
error_msg("stray syscall exit: r0 = %ld", scno);
* Do some sanity checks to figure out
* whether it's really a syscall entry.
*/
- if (arm_regs.ARM_ip && !SCNO_IN_RANGE(scno)) {
+ if (arm_regs.ARM_ip && !scno_in_range(scno)) {
if (debug_flag)
error_msg("pid %d stray syscall exit:"
" ARM_ip = %ld, scno = %ld",
{
tcp->scno = mips_REG_V0;
- if (!SCNO_IN_RANGE(tcp->scno)) {
+ if (!scno_in_range(tcp->scno)) {
if (mips_REG_A3 == 0 || mips_REG_A3 == (uint64_t) -1) {
if (debug_flag)
error_msg("stray syscall exit: v0 = %ld",
static void
decode_mips_subcall(struct tcb *tcp)
{
- if (!SCNO_IS_VALID(tcp->u_arg[0]))
+ if (!scno_is_valid(tcp->u_arg[0]))
return;
tcp->scno = tcp->u_arg[0];
tcp->qual_flg = qual_flags(tcp->scno);
static struct fault_opts *
tcb_fault_opts(struct tcb *tcp)
{
- return (SCNO_IN_RANGE(tcp->scno) && tcp->fault_vec[current_personality])
+ return (scno_in_range(tcp->scno) && tcp->fault_vec[current_personality])
? &tcp->fault_vec[current_personality][tcp->scno] : NULL;
}
if (rc != 1)
return rc;
- if (SCNO_IS_VALID(tcp->scno)) {
+ if (scno_is_valid(tcp->scno)) {
tcp->s_ent = &sysent[tcp->scno];
tcp->qual_flg = qual_flags(tcp->scno);
} else {
if (current_personality == X32_PERSONALITY_NUMBER)
scno &= ~__X32_SYSCALL_BIT;
#endif
- return SCNO_IS_VALID(scno) ? sysent[scno].sys_name: NULL;
+ return scno_is_valid(scno) ? sysent[scno].sys_name: NULL;
}