]> granicus.if.org Git - strace/commitdiff
dump*: change address argument type from long to kernel_ureg_t
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 21 Dec 2016 15:36:50 +0000 (15:36 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 25 Dec 2016 11:32:44 +0000 (11:32 +0000)
* defs.h (dumpiov_in_msghdr, dumpiov_in_mmsghdr, dumpiov_upto, dumpstr):
Change address argument type from long to kernel_ureg_t.
* mmsghdr.c (dumpiov_in_mmsghdr): Likewise.
* msghdr.c (fetch_msghdr_namelen, decode_msghdr, dumpiov_in_msghdr):
Likewise.
* util.c (dumpiov_upto, dumpstr): Likewise.

defs.h
mmsghdr.c
msghdr.c
util.c

diff --git a/defs.h b/defs.h
index 989a45d99cfe34c4df780f1ffaf36bfac3a6cbe2..6f7dbbd951dbe25ca9fc537f8a3d9b313eaf4b25 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -599,10 +599,18 @@ extern const char *sprinttime(time_t);
 extern void print_symbolic_mode_t(unsigned int);
 extern void print_numeric_umode_t(unsigned short);
 extern void print_numeric_long_umask(unsigned long);
-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
+dumpiov_in_msghdr(struct tcb *, kernel_ureg_t addr, unsigned long data_size);
+
+extern void
+dumpiov_in_mmsghdr(struct tcb *, kernel_ureg_t addr);
+
+extern void
+dumpiov_upto(struct tcb *, int len, kernel_ureg_t addr, unsigned long data_size);
+
+extern void
+dumpstr(struct tcb *, kernel_ureg_t addr, int len);
 
 extern void
 printstr_ex(struct tcb *, kernel_ureg_t addr, long len,
index 6b02774a15119f7054aa77e21267ade4b218a88d..788a0fa9141a32d19c6dd43fac02c46b7251313a 100644 (file)
--- a/mmsghdr.c
+++ b/mmsghdr.c
@@ -149,7 +149,7 @@ decode_mmsgvec(struct tcb *const tcp, const kernel_ureg_t addr,
 }
 
 void
-dumpiov_in_mmsghdr(struct tcb *tcp, long addr)
+dumpiov_in_mmsghdr(struct tcb *const tcp, kernel_ureg_t addr)
 {
        unsigned int len = tcp->u_rval;
        unsigned int i, fetched;
index 75efcd58d22f4c62d754ca8457787a6b8b6df8cd..0c87165c09e510b0b090829d03130d1cd4683213 100644 (file)
--- a/msghdr.c
+++ b/msghdr.c
@@ -365,7 +365,8 @@ print_struct_msghdr(struct tcb *tcp, const struct msghdr *msg,
 }
 
 static bool
-fetch_msghdr_namelen(struct tcb *tcp, const long addr, int *const p_msg_namelen)
+fetch_msghdr_namelen(struct tcb *const tcp, const kernel_ureg_t addr,
+                    int *const p_msg_namelen)
 {
        struct msghdr msg;
 
@@ -378,8 +379,8 @@ fetch_msghdr_namelen(struct tcb *tcp, const long addr, int *const p_msg_namelen)
 }
 
 static void
-decode_msghdr(struct tcb *tcp, const int *const p_user_msg_namelen,
-             const long addr, const unsigned long data_size)
+decode_msghdr(struct tcb *const tcp, const int *const p_user_msg_namelen,
+             const kernel_ureg_t addr, const unsigned long data_size)
 {
        struct msghdr msg;
 
@@ -390,7 +391,8 @@ decode_msghdr(struct tcb *tcp, const int *const p_user_msg_namelen,
 }
 
 void
-dumpiov_in_msghdr(struct tcb *tcp, long addr, unsigned long data_size)
+dumpiov_in_msghdr(struct tcb *const tcp, const kernel_ureg_t addr,
+                 const unsigned long data_size)
 {
        struct msghdr msg;
 
diff --git a/util.c b/util.c
index 245ffca3e65152793978e60af92f931812c8aca0..bfc4134ec5e4d82439ecbf929ba8785ae5f42ad1 100644 (file)
--- a/util.c
+++ b/util.c
@@ -922,7 +922,8 @@ printstr_ex(struct tcb *const tcp, const kernel_ureg_t addr, const long len,
 }
 
 void
-dumpiov_upto(struct tcb *tcp, int len, long addr, unsigned long data_size)
+dumpiov_upto(struct tcb *const tcp, const int len, const kernel_ureg_t addr,
+            unsigned long data_size)
 {
 #if SUPPORTED_PERSONALITIES > 1
        union {
@@ -974,7 +975,7 @@ dumpiov_upto(struct tcb *tcp, int len, long addr, unsigned long data_size)
 }
 
 void
-dumpstr(struct tcb *tcp, long addr, int len)
+dumpstr(struct tcb *const tcp, const kernel_ureg_t addr, const int len)
 {
        static int strsize = -1;
        static unsigned char *str;