From 562abec97144816da6ca1bd6bbacba8869df20b4 Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Tue, 26 Dec 2017 00:09:41 +0100 Subject: [PATCH] Add tcp argument to clear_regs * defs.h (clear_regs): Add argument struct tcb *tcp. * syscall.c (clear_regs): Likewise. * strace.c (next_event): Pass tcp to clear_regs() call. --- defs.h | 2 +- strace.c | 2 +- syscall.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/defs.h b/defs.h index 0091a359..4d2df984 100644 --- a/defs.h +++ b/defs.h @@ -400,7 +400,7 @@ extern void syscall_exiting_finish(struct tcb *); extern void count_syscall(struct tcb *, const struct timeval *); extern void call_summary(FILE *); -extern void clear_regs(void); +extern void clear_regs(struct tcb *tcp); extern int get_scno(struct tcb *); extern kernel_ulong_t get_rt_sigframe_addr(struct tcb *); diff --git a/strace.c b/strace.c index 1fcf7e24..a62f9c6c 100644 --- a/strace.c +++ b/strace.c @@ -2273,7 +2273,7 @@ next_event(int *pstatus, siginfo_t *si) return TE_NEXT; } - clear_regs(); + clear_regs(tcp); /* Set current output file */ current_tcp = tcp; diff --git a/syscall.c b/syscall.c index f38e6739..4deb1e8b 100644 --- a/syscall.c +++ b/syscall.c @@ -1100,7 +1100,7 @@ static long get_regs_error; #endif void -clear_regs(void) +clear_regs(struct tcb *tcp) { #ifdef ptrace_getregset_or_getregs get_regs_error = -1; -- 2.40.0