FILE *outf; /* Output file for this process */
const char *auxstr; /* Auxiliary info from syscall (see RVAL_STR) */
const struct_sysent *s_ent; /* sysent[scno] or dummy struct for bad scno */
+ const struct_sysent *s_prev_ent; /* for "resuming interrupted SYSCALL" msg */
struct timeval stime; /* System time usage as of last process wait */
struct timeval dtime; /* Delta for system time usage */
struct timeval etime; /* Syscall entry time */
extern void clear_regs(void);
extern void get_regs(pid_t pid);
+extern int get_scno(struct tcb *tcp);
extern int umoven(struct tcb *, long, unsigned int, char *);
#define umove(pid, addr, objp) \
int
sys_restart_syscall(struct tcb *tcp)
{
- if (entering(tcp))
- tprints("<... resuming interrupted call ...>");
+ if (entering(tcp)) {
+ tprintf("<... resuming interrupted %s ...>",
+ tcp->s_prev_ent
+ ? tcp->s_prev_ent->sys_name
+ : "system call"
+ );
+ }
return 0;
}
if (tcp->flags & TCB_STARTUP) {
if (!startup_tcb(tcp))
return false;
+ if (get_scno(tcp) == 1)
+ tcp->s_prev_ent = tcp->s_ent;
}
sig = WSTOPSIG(status);
* other: error, trace_syscall_entering() should print error indicator
* ("????" etc) and bail out.
*/
-static int
+int
get_scno(struct tcb *tcp)
{
long scno = 0;
}
printing_tcp = tcp;
+ tcp->s_prev_ent = NULL;
if (res != 1) {
/* There was error in one of prior ptrace ops */
tprints(") ");
tcp->flags &= ~TCB_INSYSCALL;
return res;
}
+ tcp->s_prev_ent = tcp->s_ent;
sys_res = 0;
if (tcp->qual_flg & QUAL_RAW) {