]> git.proxmox.com Git - mirror_qemu.git/commitdiff
linux-user: Add strace for clock_nanosleep()
authorHelge Deller <deller@gmx.de>
Sun, 18 Sep 2022 19:45:52 +0000 (21:45 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Tue, 27 Sep 2022 07:29:33 +0000 (09:29 +0200)
Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20220918194555.83535-10-deller@gmx.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/strace.c
linux-user/strace.list

index 2f539845bb908de13e71e82b3467aa1ed2f34643..6f818212d529203bc5168784851a1904bca4699b 100644 (file)
@@ -3567,6 +3567,21 @@ print_unshare(CPUArchState *cpu_env, const struct syscallname *name,
 }
 #endif
 
+#ifdef TARGET_NR_clock_nanosleep
+static void
+print_clock_nanosleep(CPUArchState *cpu_env, 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_enums(clockids, arg0, 0);
+    print_raw_param("%d", arg1, 0);
+    print_timespec(arg2, 0);
+    print_timespec(arg3, 1);
+    print_syscall_epilogue(name);
+}
+#endif
+
 #ifdef TARGET_NR_utime
 static void
 print_utime(CPUArchState *cpu_env, const struct syscallname *name,
index 4d8b7f6a5e0cd5b62ea671e88c8b84570ebb6504..215d971b2aea676f0c65efc785e31829f83ad6c5 100644 (file)
@@ -91,7 +91,8 @@
                            print_syscall_ret_clock_gettime },
 #endif
 #ifdef TARGET_NR_clock_nanosleep
-{ TARGET_NR_clock_nanosleep, "clock_nanosleep" , NULL, NULL, NULL },
+{ TARGET_NR_clock_nanosleep, "clock_nanosleep" , NULL, print_clock_nanosleep,
+                            NULL },
 #endif
 #ifdef TARGET_NR_clock_settime
 { TARGET_NR_clock_settime, "clock_settime" , NULL, print_clock_settime, NULL },