From: Kito Cheng Date: Wed, 12 May 2021 10:13:58 +0000 (+0800) Subject: linux-user: Add strace support for printing arguments of llseek X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=9f771ad8399d5832a99564919379ab29c1bbbdce;p=qmiga%2Fqemu.git linux-user: Add strace support for printing arguments of llseek Some target are using llseek instead of _llseek like riscv, nios2, hexagon, and openrisc. Signed-off-by: Kito Cheng Reviewed-by: Laurent Vivier Message-Id: <20210512101358.122781-1-kito.cheng@sifive.com> Signed-off-by: Laurent Vivier --- diff --git a/linux-user/strace.c b/linux-user/strace.c index 1cadb6d50f..cce0a5d1e3 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -2341,7 +2341,7 @@ print_linkat(void *cpu_env, const struct syscallname *name, } #endif -#ifdef TARGET_NR__llseek +#if defined(TARGET_NR__llseek) || defined(TARGET_NR_llseek) static void print__llseek(void *cpu_env, const struct syscallname *name, abi_long arg0, abi_long arg1, abi_long arg2, @@ -2361,6 +2361,7 @@ print__llseek(void *cpu_env, const struct syscallname *name, qemu_log("%s", whence); print_syscall_epilogue(name); } +#define print_llseek print__llseek #endif #ifdef TARGET_NR_lseek diff --git a/linux-user/strace.list b/linux-user/strace.list index 3b7c15578c..18f7217275 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -511,6 +511,9 @@ #ifdef TARGET_NR__llseek { TARGET_NR__llseek, "_llseek" , NULL, print__llseek, NULL }, #endif +#ifdef TARGET_NR_llseek +{ TARGET_NR_llseek, "llseek" , NULL, print_llseek, NULL }, +#endif #ifdef TARGET_NR_lock { TARGET_NR_lock, "lock" , NULL, NULL, NULL }, #endif