Message ID | 20180702175030.18621-13-f4bug@amsat.org |
---|---|
State | New |
Headers | show |
Series | linux-user: strace improvements | expand |
Le 02/07/2018 à 19:50, Philippe Mathieu-Daudé a écrit : > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > Tested-By: Guido Günther <agx@sigxcpu.org> > --- > linux-user/strace.c | 13 +++++++++++++ > linux-user/strace.list | 2 +- > 2 files changed, 14 insertions(+), 1 deletion(-) > > diff --git a/linux-user/strace.c b/linux-user/strace.c > index 9ab11059e4..f80d655835 100644 > --- a/linux-user/strace.c > +++ b/linux-user/strace.c > @@ -1995,6 +1995,19 @@ print_bind(const struct syscallname *name, > } > #endif > > +#if defined(TARGET_NR_getsockname) > +static void > +print_getsockname(const struct syscallname *name, > + abi_long arg0, abi_long arg1, abi_long arg2, > + abi_long arg3, abi_long arg4, abi_long arg5) > +{ > + print_syscall_prologue(name); > + print_raw_param("%d", arg0, 0); TARGET_AB_FMT_ld otherwise: Reviewed-by: Laurent Vivier <laurent@vivier.eu>
diff --git a/linux-user/strace.c b/linux-user/strace.c index 9ab11059e4..f80d655835 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1995,6 +1995,19 @@ print_bind(const struct syscallname *name, } #endif +#if defined(TARGET_NR_getsockname) +static void +print_getsockname(const struct syscallname *name, + abi_long arg0, abi_long arg1, abi_long arg2, + abi_long arg3, abi_long arg4, abi_long arg5) +{ + print_syscall_prologue(name); + print_raw_param("%d", arg0, 0); + print_sockaddr_ptr(arg1, arg2, 1); + print_syscall_epilogue(name); +} +#endif + #if defined(TARGET_NR_sendto) static void print_sendto(const struct syscallname *name, diff --git a/linux-user/strace.list b/linux-user/strace.list index 06597fd58c..019bf54850 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -371,7 +371,7 @@ { TARGET_NR_getsid, "getsid" , NULL, NULL, NULL }, #endif #ifdef TARGET_NR_getsockname -{ TARGET_NR_getsockname, "getsockname" , NULL, NULL, NULL }, +{ TARGET_NR_getsockname, "getsockname" , NULL, print_getsockname, NULL }, #endif #ifdef TARGET_NR_getsockopt { TARGET_NR_getsockopt, "getsockopt" , NULL, NULL, NULL },