diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2019-10-21 13:48:56 +0200 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2019-10-21 15:37:04 +0200 |
commit | 42b15d70cf0f14511dcb114e18ebcb01aae61808 (patch) | |
tree | 15d3e124b1f269c6c209b50c18fceee84f5f2e75 /linux-user/strace.c | |
parent | bb10540e76e0c265a2988002117946a4b2e736af (diff) | |
download | qemu-42b15d70cf0f14511dcb114e18ebcb01aae61808.zip qemu-42b15d70cf0f14511dcb114e18ebcb01aae61808.tar.gz qemu-42b15d70cf0f14511dcb114e18ebcb01aae61808.tar.bz2 |
linux-user/strace: Let print_sockaddr() have a 'last' argument
If the format is not the syscall last argument, a comma is append.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20191021114857.20538-9-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/strace.c')
-rw-r--r-- | linux-user/strace.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/linux-user/strace.c b/linux-user/strace.c index cd92c77..3d4d684 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -67,7 +67,7 @@ UNUSED static void print_timeval(abi_ulong, int); UNUSED static void print_timezone(abi_ulong, int); UNUSED static void print_number(abi_long, int); UNUSED static void print_signal(abi_ulong, int); -UNUSED static void print_sockaddr(abi_ulong addr, abi_long addrlen); +UNUSED static void print_sockaddr(abi_ulong, abi_long, int); UNUSED static void print_socket_domain(int domain); UNUSED static void print_socket_type(int type); UNUSED static void print_socket_protocol(int domain, int type, int protocol); @@ -336,7 +336,7 @@ static void print_siginfo(const target_siginfo_t *tinfo) } static void -print_sockaddr(abi_ulong addr, abi_long addrlen) +print_sockaddr(abi_ulong addr, abi_long addrlen, int last) { struct target_sockaddr *sa; int i; @@ -418,7 +418,7 @@ print_sockaddr(abi_ulong addr, abi_long addrlen) } else { print_raw_param("0x"TARGET_ABI_FMT_lx, addr, 0); } - gemu_log(", "TARGET_ABI_FMT_ld, addrlen); + gemu_log(", "TARGET_ABI_FMT_ld"%s", addrlen, get_comma(last)); } static void @@ -1751,7 +1751,7 @@ static void do_print_sockaddr(const char *name, abi_long arg1) gemu_log("%s(", name); print_sockfd(sockfd, 0); - print_sockaddr(addr, addrlen); + print_sockaddr(addr, addrlen, 0); gemu_log(")"); } @@ -1821,7 +1821,7 @@ static void do_print_msgaddr(const char *name, abi_long arg1) print_buf(msg, len, 0); print_raw_param(TARGET_ABI_FMT_ld, len, 0); print_flags(msg_flags, flags, 0); - print_sockaddr(addr, addrlen); + print_sockaddr(addr, addrlen, 0); gemu_log(")"); } |