@samitouri / QOSamiQemu / commits / 1730e6f33f

linux-user/strace: Use pointer type for read and write values

The stack pointer is being truncated as 32-bits for qemu-riscv64, so let's use %p to print the syscall pointer argument. Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3238 Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Nutty Liu <nutty.liu@hotmail.com> Signed-off-by: Helge Deller <deller@gmx.de>

Alistair Francis committed Apr 16, 2026 at 09:37 UTC 1730e6f33f9732658b88c2e4eda257f50531ef0e
1 file changed +2 -2
linux-user/strace.list
+2 -2
@@ -1114,7 +1114,7 @@
1114 { TARGET_NR_quotactl, "quotactl" , NULL, NULL, NULL },
1115 #endif
1116 #ifdef TARGET_NR_read
1117 -{ TARGET_NR_read, "read" , "%s(%d,%#x,%d)", NULL, NULL },
1117 +{ TARGET_NR_read, "read" , "%s(%d,%p,%d)", NULL, NULL },
1118 #endif
1119 #ifdef TARGET_NR_readahead
1120 { TARGET_NR_readahead, "readahead" , NULL, NULL, NULL },
@@ -1674,7 +1674,7 @@
1674 print_syscall_ret_waitpid },
1675 #endif
1676 #ifdef TARGET_NR_write
1677 -{ TARGET_NR_write, "write" , "%s(%d,%#x,%d)", NULL, NULL },
1677 +{ TARGET_NR_write, "write" , "%s(%d,%p,%d)", NULL, NULL },
1678 #endif
1679 #ifdef TARGET_NR_writev
1680 { TARGET_NR_writev, "writev" , "%s(%d,%p,%#x)", NULL, NULL },