From: Dmitry V. Levin Date: Thu, 22 Dec 2016 00:37:28 +0000 (+0000) Subject: print_time*: change tracee address argument type from long to kernel_ureg_t X-Git-Tag: v4.16~215 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61b2e2199f435e7455711271499a90d4039f57b7;p=strace print_time*: change tracee address argument type from long to kernel_ureg_t * defs.h [ALPHA] (sprint_timeval32, print_timeval32, print_timeval32_pair, print_itimerval32): Change address argument type from long to kernel_ureg_t. * desc.c (decode_select): Change the type of tracee address argument of print_tv_ts and sprint_tv_ts from long to kernel_ureg_t. * print_timespec.c (print_timespec, sprint_timespec, print_timespec_utime_pair, print_itimerspec): Change address argument type from long to kernel_ureg_t. * print_timeval.c (print_timeval, print_timeval_pair, sprint_timeval, print_itimerval, print_timeval32, print_timeval32_pair, print_itimerval32, sprint_timeval32): Likewise. --- diff --git a/defs.h b/defs.h index f44a9fb7..7873edbf 100644 --- a/defs.h +++ b/defs.h @@ -814,10 +814,10 @@ typedef struct { extern void print_timeval32_t(const timeval32_t *); extern void printrusage32(struct tcb *, long); -extern const char *sprint_timeval32(struct tcb *tcp, long); -extern void print_timeval32(struct tcb *tcp, long); -extern void print_timeval32_pair(struct tcb *tcp, long); -extern void print_itimerval32(struct tcb *tcp, long); +extern const char *sprint_timeval32(struct tcb *tcp, kernel_ureg_t); +extern void print_timeval32(struct tcb *tcp, kernel_ureg_t); +extern void print_timeval32_pair(struct tcb *tcp, kernel_ureg_t); +extern void print_itimerval32(struct tcb *tcp, kernel_ureg_t); #endif #ifdef HAVE_STRUCT_USER_DESC diff --git a/desc.c b/desc.c index 5b8b7dfd..d6d50eef 100644 --- a/desc.c +++ b/desc.c @@ -69,9 +69,9 @@ SYS_FUNC(dup3) } static int -decode_select(struct tcb *tcp, kernel_ureg_t *args, - void (*print_tv_ts) (struct tcb *, const long), - const char * (*sprint_tv_ts) (struct tcb *, const long)) +decode_select(struct tcb *const tcp, const kernel_ureg_t *const args, + void (*const print_tv_ts) (struct tcb *, kernel_ureg_t), + const char * (*const sprint_tv_ts) (struct tcb *, kernel_ureg_t)) { int i, j; int nfds, fdsize; diff --git a/print_timespec.c b/print_timespec.c index ee16cf87..209016df 100644 --- a/print_timespec.c +++ b/print_timespec.c @@ -65,7 +65,7 @@ print_timespec_t_utime(const timespec_t *t) } MPERS_PRINTER_DECL(void, print_timespec, - struct tcb *tcp, const long addr) + struct tcb *const tcp, const kernel_ureg_t addr) { timespec_t t; @@ -76,7 +76,7 @@ MPERS_PRINTER_DECL(void, print_timespec, } MPERS_PRINTER_DECL(const char *, sprint_timespec, - struct tcb *tcp, const long addr) + struct tcb *const tcp, const kernel_ureg_t addr) { timespec_t t; static char buf[sizeof(timespec_fmt) + 3 * sizeof(t)]; @@ -95,7 +95,7 @@ MPERS_PRINTER_DECL(const char *, sprint_timespec, } MPERS_PRINTER_DECL(void, print_timespec_utime_pair, - struct tcb *tcp, const long addr) + struct tcb *const tcp, const kernel_ureg_t addr) { timespec_t t[2]; @@ -110,7 +110,7 @@ MPERS_PRINTER_DECL(void, print_timespec_utime_pair, } MPERS_PRINTER_DECL(void, print_itimerspec, - struct tcb *tcp, const long addr) + struct tcb *const tcp, const kernel_ureg_t addr) { timespec_t t[2]; diff --git a/print_timeval.c b/print_timeval.c index 1b4807c4..de4580f0 100644 --- a/print_timeval.c +++ b/print_timeval.c @@ -47,7 +47,7 @@ MPERS_PRINTER_DECL(void, print_struct_timeval, const void *arg) } MPERS_PRINTER_DECL(void, print_timeval, - struct tcb *tcp, const long addr) + struct tcb *const tcp, const kernel_ureg_t addr) { timeval_t t; @@ -68,7 +68,7 @@ print_timeval_item(struct tcb *tcp, void *elem_buf, size_t size, void *data) } MPERS_PRINTER_DECL(void, print_timeval_pair, - struct tcb *tcp, const long addr) + struct tcb *const tcp, const kernel_ureg_t addr) { timeval_t t; @@ -77,7 +77,7 @@ MPERS_PRINTER_DECL(void, print_timeval_pair, } MPERS_PRINTER_DECL(const char *, sprint_timeval, - struct tcb *tcp, const long addr) + struct tcb *const tcp, const kernel_ureg_t addr) { timeval_t t; static char buf[sizeof(timeval_fmt) + 3 * sizeof(t)]; @@ -96,7 +96,7 @@ MPERS_PRINTER_DECL(const char *, sprint_timeval, } MPERS_PRINTER_DECL(void, print_itimerval, - struct tcb *tcp, const long addr) + struct tcb *const tcp, const kernel_ureg_t addr) { timeval_t t[2]; @@ -119,7 +119,7 @@ print_timeval32_t(const timeval32_t *t) } void -print_timeval32(struct tcb *tcp, const long addr) +print_timeval32(struct tcb *const tcp, const kernel_ureg_t addr) { timeval32_t t; @@ -130,7 +130,7 @@ print_timeval32(struct tcb *tcp, const long addr) } void -print_timeval32_pair(struct tcb *tcp, const long addr) +print_timeval32_pair(struct tcb *const tcp, const kernel_ureg_t addr) { timeval32_t t[2]; @@ -145,7 +145,7 @@ print_timeval32_pair(struct tcb *tcp, const long addr) } void -print_itimerval32(struct tcb *tcp, const long addr) +print_itimerval32(struct tcb *const tcp, const kernel_ureg_t addr) { timeval32_t t[2]; @@ -160,7 +160,7 @@ print_itimerval32(struct tcb *tcp, const long addr) } const char * -sprint_timeval32(struct tcb *tcp, const long addr) +sprint_timeval32(struct tcb *const tcp, const kernel_ureg_t addr) { timeval32_t t; static char buf[sizeof(timeval_fmt) + 3 * sizeof(t)];