printstr*: change address argument type from long to kernel_ureg_t

* defs.h (printstr_ex, printstr_ex): Change address argument type
from long to kernel_ureg_t.
* util.c (printstr_ex): Likewise.
This commit is contained in:
Дмитрий Левин 2016-12-20 21:59:24 +00:00
parent 956e3a34a3
commit 5e4019c3bc
2 changed files with 7 additions and 4 deletions

8
defs.h
View File

@ -603,8 +603,10 @@ extern void dumpiov_in_msghdr(struct tcb *, long, unsigned long);
extern void dumpiov_in_mmsghdr(struct tcb *, long);
extern void dumpiov_upto(struct tcb *, int, long, unsigned long);
extern void dumpstr(struct tcb *, long, int);
extern void printstr_ex(struct tcb *, long addr, long len,
unsigned int user_style);
extern void
printstr_ex(struct tcb *, kernel_ureg_t addr, long len,
unsigned int user_style);
#define DECL_PRINTNUM(name) \
extern bool \
@ -739,7 +741,7 @@ printaddr(kernel_ureg_t addr)
}
static inline void
printstr(struct tcb *tcp, long addr, long len)
printstr(struct tcb *tcp, kernel_ureg_t addr, long len)
{
printstr_ex(tcp, addr, len, 0);
}

3
util.c
View File

@ -856,7 +856,8 @@ printpath(struct tcb *tcp, long addr)
* or `len' != -1 and the string length exceeds `len'.
*/
void
printstr_ex(struct tcb *tcp, long addr, long len, unsigned int user_style)
printstr_ex(struct tcb *const tcp, const kernel_ureg_t addr, const long len,
const unsigned int user_style)
{
static char *str = NULL;
static char *outstr;