diff mbox series

[v3,2/5] linux-user: Display sockaddr buffer as pointer

Message ID 20240807124306.52903-3-philmd@linaro.org (mailing list archive)
State New, archived
Headers show
Series linux-user: Trace sendto/recvfrom | expand

Commit Message

Philippe Mathieu-Daudé Aug. 7, 2024, 12:43 p.m. UTC
Rather than 'raw param', display as pointer to get
"NULL" instead of "0x00000000".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
 linux-user/strace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ilya Leoshkevich Oct. 2, 2024, 7:43 a.m. UTC | #1
On Wed, 2024-08-07 at 14:43 +0200, Philippe Mathieu-Daudé wrote:
> Rather than 'raw param', display as pointer to get
> "NULL" instead of "0x00000000".
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
diff mbox series

Patch

diff --git a/linux-user/strace.c b/linux-user/strace.c
index 73f81e66fc..80f64ff40c 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -434,7 +434,7 @@  print_sockaddr(abi_ulong addr, abi_long addrlen, int last)
         }
         unlock_user(sa, addr, 0);
     } else {
-        print_raw_param("0x"TARGET_ABI_FMT_lx, addr, 1);
+        print_pointer(addr, 1);
     }
     qemu_log(","TARGET_ABI_FMT_ld"%s", addrlen, get_comma(last));
 }