All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] linux-user: Add strace support for printing arguments of llseek
@ 2021-05-12 10:13 Kito Cheng
  2021-05-12 11:15 ` Laurent Vivier
  2021-05-15 19:41 ` Laurent Vivier
  0 siblings, 2 replies; 3+ messages in thread
From: Kito Cheng @ 2021-05-12 10:13 UTC (permalink / raw)
  To: qemu-devel, kito.cheng, Laurent Vivier; +Cc: Kito Cheng

Some target are using llseek instead of _llseek like riscv,
nios2, hexagon, and openrisc.

Signed-off-by: Kito Cheng <kito.cheng@sifive.com>
---
 linux-user/strace.c    | 3 ++-
 linux-user/strace.list | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/linux-user/strace.c b/linux-user/strace.c
index e969121b6c..4ebf85b063 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -2335,7 +2335,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,
@@ -2355,6 +2355,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 084048ab96..46e1410836 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
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] linux-user: Add strace support for printing arguments of llseek
  2021-05-12 10:13 [PATCH] linux-user: Add strace support for printing arguments of llseek Kito Cheng
@ 2021-05-12 11:15 ` Laurent Vivier
  2021-05-15 19:41 ` Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2021-05-12 11:15 UTC (permalink / raw)
  To: Kito Cheng, qemu-devel, kito.cheng

Le 12/05/2021 à 12:13, Kito Cheng a écrit :
> Some target are using llseek instead of _llseek like riscv,
> nios2, hexagon, and openrisc.
> 
> Signed-off-by: Kito Cheng <kito.cheng@sifive.com>
> ---
>  linux-user/strace.c    | 3 ++-
>  linux-user/strace.list | 3 +++
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/linux-user/strace.c b/linux-user/strace.c
> index e969121b6c..4ebf85b063 100644
> --- a/linux-user/strace.c
> +++ b/linux-user/strace.c
> @@ -2335,7 +2335,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,
> @@ -2355,6 +2355,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 084048ab96..46e1410836 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
> 

Reviewed-by: Laurent Vivier <laurent@vivier.eu>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] linux-user: Add strace support for printing arguments of llseek
  2021-05-12 10:13 [PATCH] linux-user: Add strace support for printing arguments of llseek Kito Cheng
  2021-05-12 11:15 ` Laurent Vivier
@ 2021-05-15 19:41 ` Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2021-05-15 19:41 UTC (permalink / raw)
  To: Kito Cheng, qemu-devel, kito.cheng

Le 12/05/2021 à 12:13, Kito Cheng a écrit :
> Some target are using llseek instead of _llseek like riscv,
> nios2, hexagon, and openrisc.
> 
> Signed-off-by: Kito Cheng <kito.cheng@sifive.com>
> ---
>  linux-user/strace.c    | 3 ++-
>  linux-user/strace.list | 3 +++
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/linux-user/strace.c b/linux-user/strace.c
> index e969121b6c..4ebf85b063 100644
> --- a/linux-user/strace.c
> +++ b/linux-user/strace.c
> @@ -2335,7 +2335,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,
> @@ -2355,6 +2355,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 084048ab96..46e1410836 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
> 


Applied to my linux-user-for-6.1 branch.

Thanks,
Laurent


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-15 19:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12 10:13 [PATCH] linux-user: Add strace support for printing arguments of llseek Kito Cheng
2021-05-12 11:15 ` Laurent Vivier
2021-05-15 19:41 ` Laurent Vivier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.