printrusage*: change tracee address argument type from long to kernel_ureg_t

* defs.h [ALPHA] (printrusage32): Change address argument type
from long to kernel_ureg_t.
* printrusage.c (printrusage): Likewise.
[ALPHA] (printrusage32): Likewise.
* wait.c (printwaitn): Change the type of tracee address argument
of print_rusage from long to kernel_ureg_t.
This commit is contained in:
Дмитрий Левин 2016-12-22 00:54:18 +00:00
parent 61b2e2199f
commit 3f8d42d94f
3 changed files with 6 additions and 4 deletions

2
defs.h
View File

@ -813,7 +813,7 @@ typedef struct {
} timeval32_t; } timeval32_t;
extern void print_timeval32_t(const timeval32_t *); extern void print_timeval32_t(const timeval32_t *);
extern void printrusage32(struct tcb *, long); extern void printrusage32(struct tcb *, kernel_ureg_t);
extern const char *sprint_timeval32(struct tcb *tcp, kernel_ureg_t); 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(struct tcb *tcp, kernel_ureg_t);
extern void print_timeval32_pair(struct tcb *tcp, kernel_ureg_t); extern void print_timeval32_pair(struct tcb *tcp, kernel_ureg_t);

View File

@ -37,7 +37,8 @@ typedef struct rusage rusage_t;
#include MPERS_DEFS #include MPERS_DEFS
MPERS_PRINTER_DECL(void, printrusage, struct tcb *tcp, long addr) MPERS_PRINTER_DECL(void, printrusage,
struct tcb *const tcp, const kernel_ureg_t addr)
{ {
rusage_t ru; rusage_t ru;
@ -74,7 +75,7 @@ MPERS_PRINTER_DECL(void, printrusage, struct tcb *tcp, long addr)
#ifdef ALPHA #ifdef ALPHA
void void
printrusage32(struct tcb *tcp, long addr) printrusage32(struct tcb *const tcp, const kernel_ureg_t addr)
{ {
struct rusage32 { struct rusage32 {
timeval32_t ru_utime; /* user time used */ timeval32_t ru_utime; /* user time used */

3
wait.c
View File

@ -117,7 +117,8 @@ printstatus(int status)
} }
static int static int
printwaitn(struct tcb *tcp, void (*const print_rusage)(struct tcb *, long)) printwaitn(struct tcb *const tcp,
void (*const print_rusage)(struct tcb *, kernel_ureg_t))
{ {
if (entering(tcp)) { if (entering(tcp)) {
/* On Linux, kernel-side pid_t is typedef'ed to int /* On Linux, kernel-side pid_t is typedef'ed to int