[PATCH] Fix decoding of newfstatat syscall on x86-64

Andreas Schwab schwab at redhat.com
Fri Oct 16 09:41:21 UTC 2009


>From 61b7435ca146c8a75f867ae0e1fd35d74d7f86a5 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab at redhat.com>
Date: Fri, 16 Oct 2009 11:37:13 +0200
Subject: [PATCH] Fix decoding of newfstatat syscall on x86-64

* file.c (printstat64) [LINUX && X68_64]: If tracing a 64-bit
process redirect to printstat.
Fixes RH#529316 "Field values shown for "newfstatat" system
call are incorrect"
---
 file.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/file.c b/file.c
index 4a2512f..2c0881e 100644
--- a/file.c
+++ b/file.c
@@ -1079,6 +1079,13 @@ printstat64(struct tcb *tcp, long addr)
 # endif
 #endif /* LINUXSPARC */
 
+#if defined LINUX && defined X86_64
+	if (current_personality == 0) {
+		printstat(tcp, addr);
+		return;
+	}
+#endif
+ 
 	if (umove(tcp, addr, &statbuf) < 0) {
 		tprintf("{...}");
 		return;
-- 
1.6.5


-- 
Andreas Schwab, schwab at redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."




More information about the Strace-devel mailing list