]> granicus.if.org Git - strace/commit
struct tcb: make types of syscall arguments unsigned
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 19 Dec 2016 12:05:31 +0000 (12:05 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 19 Dec 2016 12:38:29 +0000 (12:38 +0000)
commitfc346f1d9125ad7fdda748923ac733f4f00fd272
treeec4efb662d067dcd547eac270dee46a337f9c26e
parent29107a40e905e7fa70f1e5ee16c5f98a3a273a76
struct tcb: make types of syscall arguments unsigned

This is the first step in the direction of revisiting current practice
of indiscriminate use of signed types for syscall arguments and memory
addresses.

* kernel_types.h (kernel_ureg_t): New type, typedef to unsigned long.
* defs.h (struct tcb): Change type of u_arg from long to kernel_ureg_t.
[HAVE_STRUCT_TCB_EXT_ARG]: Change type of ext_arg from long long
to unsigned long long.
* desc.c (decode_select): Change type of syscall arguments from long
to kernel_ureg_t.
(SYS_FUNC(oldselect)): Change type of select_args from long
to kernel_ureg_t.
* io.c (print_lld_from_low_high_val): Remove no longer needed cast
of syscall arguments to unsigned long.
* lseek.c (SYS_FUNC(lseek)): Cast syscall argument from unsigned long
to long.
* mem.c (print_mmap): Change type of syscall arguments from long
to kernel_ureg_t.
(SYS_FUNC(old_mmap), SYS_FUNC(old_mmap_pgoff)): Change type of u_arg
from long to kernel_ureg_t.
(SYS_FUNC(mmap), SYS_FUNC(mmap_pgoff), SYS_FUNC(mmap_pgoff)): Remove
no longer needed cast of syscall arguments to unsigned long.
* pathtrace.c (pathtrace_match): Change type of args and select_args
from long to kernel_ureg_t.
* util.c (getarg_ull): Remove no longer needed casts of syscall
arguments to unsigned types.
defs.h
desc.c
io.c
kernel_types.h
lseek.c
mem.c
pathtrace.c
util.c