]> granicus.if.org Git - strace/commitdiff
mem: change tracee address type from unsigned long to kernel_ureg_t
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 23 Dec 2016 12:45:03 +0000 (12:45 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 23 Dec 2016 19:26:58 +0000 (19:26 +0000)
* mem.c (print_mmap, SYS_FUNC(remap_file_pages),
SYS_FUNC(subpage_prot)): Change the type of variables containing tracee
addresses from unsigned long to kernel_ureg_t.

mem.c

diff --git a/mem.c b/mem.c
index 5af1db3b65cc2803ba98d283fb2d12e1d730bf77..988638aff17eab53c8ec557f6eed7ffd83f66e9e 100644 (file)
--- a/mem.c
+++ b/mem.c
@@ -57,7 +57,7 @@ SYS_FUNC(brk)
 static void
 print_mmap(struct tcb *tcp, kernel_ureg_t *u_arg, unsigned long long offset)
 {
-       const unsigned long addr = u_arg[0];
+       const kernel_ureg_t addr = u_arg[0];
        const unsigned long len = u_arg[1];
        const unsigned long prot = u_arg[2];
        const unsigned long flags = u_arg[3];
@@ -312,7 +312,7 @@ SYS_FUNC(getpagesize)
 
 SYS_FUNC(remap_file_pages)
 {
-       const unsigned long addr = tcp->u_arg[0];
+       const kernel_ureg_t addr = tcp->u_arg[0];
        const unsigned long size = tcp->u_arg[1];
        const unsigned long prot = tcp->u_arg[2];
        const unsigned long pgoff = tcp->u_arg[3];
@@ -343,10 +343,10 @@ print_protmap_entry(struct tcb *tcp, void *elem_buf, size_t elem_size, void *dat
 
 SYS_FUNC(subpage_prot)
 {
-       unsigned long addr = tcp->u_arg[0];
+       kernel_ureg_t addr = tcp->u_arg[0];
        unsigned long len = tcp->u_arg[1];
        unsigned long nmemb = len >> 16;
-       unsigned long map = tcp->u_arg[2];
+       kernel_ureg_t map = tcp->u_arg[2];
 
        printaddr(addr);
        tprintf(", %lu, ", len);