Move printargs* functions to util.c
* syscall.c (printargs, printargs_u, printargs_d): Move ... * util.c: ... here.
This commit is contained in:
parent
be06426625
commit
3c1105d49c
34
syscall.c
34
syscall.c
@ -630,40 +630,6 @@ decode_mips_subcall(struct tcb *tcp)
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
printargs(struct tcb *tcp)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
int i;
|
||||
int n = tcp->s_ent->nargs;
|
||||
for (i = 0; i < n; i++)
|
||||
tprintf("%s%#lx", i ? ", " : "", tcp->u_arg[i]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
printargs_u(struct tcb *tcp)
|
||||
{
|
||||
const int n = tcp->s_ent->nargs;
|
||||
int i;
|
||||
for (i = 0; i < n; ++i)
|
||||
tprintf("%s%u", i ? ", " : "",
|
||||
(unsigned int) tcp->u_arg[i]);
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
||||
int
|
||||
printargs_d(struct tcb *tcp)
|
||||
{
|
||||
const int n = tcp->s_ent->nargs;
|
||||
int i;
|
||||
for (i = 0; i < n; ++i)
|
||||
tprintf("%s%d", i ? ", " : "",
|
||||
(int) tcp->u_arg[i]);
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
||||
static void
|
||||
dumpio(struct tcb *tcp)
|
||||
{
|
||||
|
34
util.c
34
util.c
@ -1400,3 +1400,37 @@ print_array(struct tcb *tcp,
|
||||
|
||||
return cur >= end_addr;
|
||||
}
|
||||
|
||||
int
|
||||
printargs(struct tcb *tcp)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
int i;
|
||||
int n = tcp->s_ent->nargs;
|
||||
for (i = 0; i < n; i++)
|
||||
tprintf("%s%#lx", i ? ", " : "", tcp->u_arg[i]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
printargs_u(struct tcb *tcp)
|
||||
{
|
||||
const int n = tcp->s_ent->nargs;
|
||||
int i;
|
||||
for (i = 0; i < n; ++i)
|
||||
tprintf("%s%u", i ? ", " : "",
|
||||
(unsigned int) tcp->u_arg[i]);
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
||||
int
|
||||
printargs_d(struct tcb *tcp)
|
||||
{
|
||||
const int n = tcp->s_ent->nargs;
|
||||
int i;
|
||||
for (i = 0; i < n; ++i)
|
||||
tprintf("%s%d", i ? ", " : "",
|
||||
(int) tcp->u_arg[i]);
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user