aboutsummaryrefslogtreecommitdiff
path: root/linux-user/strace.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/strace.c')
-rw-r--r--linux-user/strace.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 2dcc15496a..31c7be24eb 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -1962,6 +1962,53 @@ print_lseek(void *cpu_env, const struct syscallname *name,
}
#endif
+#ifdef TARGET_NR_truncate
+static void
+print_truncate(void *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_string(arg0, 0);
+ print_raw_param(TARGET_ABI_FMT_ld, arg1, 1);
+ print_syscall_epilogue(name);
+}
+#endif
+
+#ifdef TARGET_NR_truncate64
+static void
+print_truncate64(void *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_string(arg0, 0);
+ if (regpairs_aligned(cpu_env, TARGET_NR_truncate64)) {
+ arg1 = arg2;
+ arg2 = arg3;
+ }
+ print_raw_param("%" PRIu64, target_offset64(arg1, arg2), 1);
+ print_syscall_epilogue(name);
+}
+#endif
+
+#ifdef TARGET_NR_ftruncate64
+static void
+print_ftruncate64(void *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_raw_param("%d", arg0, 0);
+ if (regpairs_aligned(cpu_env, TARGET_NR_ftruncate64)) {
+ arg1 = arg2;
+ arg2 = arg3;
+ }
+ print_raw_param("%" PRIu64, target_offset64(arg1, arg2), 1);
+ print_syscall_epilogue(name);
+}
+#endif
+
#if defined(TARGET_NR_socket)
static void
print_socket(void *cpu_env, const struct syscallname *name,