Consistently use printaddr for printing addresses
* bjm.c (SYS_FUNC(init_module)): Use printaddr.
* clone.c (SYS_FUNC(clone)): Likewise.
* evdev.c (ff_effect_ioctl): Likewise.
* mtd.c (decode_mtd_oob_buf): Likewise.
* net.c (SYS_FUNC(sendmmsg), SYS_FUNC(recvmmsg), SYS_FUNC(getsockopt)):
Likewise.
* print_sigevent.c (print_sigevent): Likewise.
* printsiginfo.c (printsigval, print_si_info): Likewise.
* signal.c (decode_new_sigaction): Likewise.
* sysmips.c (SYS_FUNC(sysmips)): Likewise.
* util.c (printpathn, printstr, umoven_or_printaddr): Likewise.
* v4l2.c (print_v4l2_buffer, print_v4l2_framebuffer,
umoven_or_printaddr_ignore_syserror): Likewise.
* tests/net-icmp_filter.c (main): Update.
Based on patch by Eugene Syromyatnikov <evgsyr@gmail.com>.
diff --git a/clone.c b/clone.c
index 2fad0b8..99d0da7 100644
--- a/clone.c
+++ b/clone.c
@@ -82,7 +82,9 @@
if (exiting(tcp)) {
const char *sep = "|";
unsigned long flags = tcp->u_arg[ARG_FLAGS];
- tprintf("child_stack=%#lx, ", tcp->u_arg[ARG_STACK]);
+ tprints("child_stack=");
+ printaddr(tcp->u_arg[ARG_STACK]);
+ tprints(", ");
#ifdef ARG_STACKSIZE
if (ARG_STACKSIZE != -1)
tprintf("stack_size=%#lx, ",
@@ -96,8 +98,10 @@
if ((flags & (CLONE_PARENT_SETTID|CLONE_CHILD_SETTID
|CLONE_CHILD_CLEARTID|CLONE_SETTLS)) == 0)
return 0;
- if (flags & CLONE_PARENT_SETTID)
- tprintf(", parent_tidptr=%#lx", tcp->u_arg[ARG_PTID]);
+ if (flags & CLONE_PARENT_SETTID) {
+ tprints(", parent_tidptr=");
+ printaddr(tcp->u_arg[ARG_PTID]);
+ }
if (flags & CLONE_SETTLS) {
#if defined I386 || defined X86_64 || defined X32
# ifndef I386
@@ -111,10 +115,15 @@
else
# endif
#endif /* I386 || X86_64 || X32 */
- tprintf(", tls=%#lx", tcp->u_arg[ARG_TLS]);
+ {
+ tprints(", tls=");
+ printaddr(tcp->u_arg[ARG_TLS]);
+ }
}
- if (flags & (CLONE_CHILD_SETTID|CLONE_CHILD_CLEARTID))
- tprintf(", child_tidptr=%#lx", tcp->u_arg[ARG_CTID]);
+ if (flags & (CLONE_CHILD_SETTID|CLONE_CHILD_CLEARTID)) {
+ tprints(", child_tidptr=");
+ printaddr(tcp->u_arg[ARG_CTID]);
+ }
}
/* TODO on syscall entry:
* We can clear CLONE_PTRACE here since it is an ancient hack