diff options
author | Helge Deller <deller@gmx.de> | 2023-03-12 23:17:13 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2023-07-08 16:55:08 +0200 |
commit | 036cf169a3484eeca5e17cfbee1f6988043ddd0e (patch) | |
tree | 500f27d7cb29fdfe817c1083c232cbfcf75b6934 /linux-user/strace.c | |
parent | dca4c8384d68bbf5d67f50a5446865d92d61f032 (diff) | |
download | qemu-036cf169a3484eeca5e17cfbee1f6988043ddd0e.zip qemu-036cf169a3484eeca5e17cfbee1f6988043ddd0e.tar.gz qemu-036cf169a3484eeca5e17cfbee1f6988043ddd0e.tar.bz2 |
linux-user: Improve strace output of pread64() and pwrite64()
Make the strace look nicer for those two syscalls.
Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user/strace.c')
-rw-r--r-- | linux-user/strace.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/linux-user/strace.c b/linux-user/strace.c index aad2b62..669200c 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -3999,6 +3999,25 @@ print_tgkill(CPUArchState *cpu_env, const struct syscallname *name, } #endif +#if defined(TARGET_NR_pread64) || defined(TARGET_NR_pwrite64) +static void +print_pread64(CPUArchState *cpu_env, const struct syscallname *name, + abi_long arg0, abi_long arg1, abi_long arg2, + abi_long arg3, abi_long arg4, abi_long arg5) +{ + if (regpairs_aligned(cpu_env, TARGET_NR_pread64)) { + arg3 = arg4; + arg4 = arg5; + } + print_syscall_prologue(name); + print_raw_param("%d", arg0, 0); + print_pointer(arg1, 0); + print_raw_param("%d", arg2, 0); + print_raw_param("%" PRIu64, target_offset64(arg3, arg4), 1); + print_syscall_epilogue(name); +} +#endif + #ifdef TARGET_NR_statx static void print_statx(CPUArchState *cpu_env, const struct syscallname *name, |