sparc and alpha fixes

Jakub Bogusz qboosh at pld-linux.org
Mon Sep 3 21:18:57 UTC 2007


Hello,

The attached patches fix the following issues:
- missing prototypes in sparc syscall list (needed to build current
  strace on sparc) (newsysc patch)
- some mistakes in alpha and sparc syscall lists (getdents64,
  newsysc patches)
- sparc64 compilation errors (sparc64 patch)

Updated and tested against strace 4.5.16.


-- 
Jakub Bogusz    http://qboosh.pl/
-------------- next part --------------
--- strace-4.5.14/linux/alpha/syscallent.h.orig	2006-01-21 22:46:18.938740250 +0100
+++ strace-4.5.14/linux/alpha/syscallent.h	2006-01-21 22:53:55.047245250 +0100
@@ -405,7 +405,7 @@
 	{ 2,	TF,	sys_pivotroot,		"pivot_root"		}, /* 374 */
 	{ 3,	0,	sys_mincore,		"mincore"		}, /* 375 */
 	{ 3,	0,	printargs,		"pciconfig_iobase"	}, /* 376 */
-	{ 4,	TD,	sys_getdents64,		"getdents64"		}, /* 377 */
+	{ 3,	TD,	sys_getdents64,		"getdents64"		}, /* 377 */
 	{ 0,	0,	printargs,		"gettid"		}, /* 378 */
 	{ 4,	TD,	sys_readahead,		"readahead"		}, /* 379 */
 	{ 5,	0,	printargs,		"SYS_380"		}, /* 380 */
--- strace-4.5.14/linux/sparc/syscallent.h.orig	2006-01-21 22:46:18.942740500 +0100
+++ strace-4.5.14/linux/sparc/syscallent.h	2006-01-21 22:52:02.012181000 +0100
@@ -152,7 +152,7 @@
 	{ 4,	TN,	sys_getmsg,	"getmsg" },		/* 151 */
 	{ 4,	TN,	sys_putmsg,	"putmsg" },		/* 152 */
 	{ 3,	TD,	sys_poll,	"poll" },		/* 153 */
-	{ 4,	TD,	sys_getdents64,	"getdents64" },		/* 154 */
+	{ 3,	TD,	sys_getdents64,	"getdents64" },		/* 154 */
 	{ 3,	TD,	sys_fcntl,	"fcntl64" },		/* 155 */
 	{ 4,	0,	printargs,	"getdirentries" },	/* 156 */
 	{ 2,	TF,	sys_statfs,	"statfs" },		/* 157 */
-------------- next part --------------
--- strace-4.5.14/linux/alpha/syscallent.h.orig	2006-01-12 23:34:50.000000000 +0100
+++ strace-4.5.14/linux/alpha/syscallent.h	2006-01-21 22:45:08.102313250 +0100
@@ -103,7 +103,7 @@
 	{ 5,	0,	printargs,		"osf_old_vadvise"	}, /* 72, not implemented */
 	{ 2,	0,	sys_munmap,		"munmap"		}, /* 73 */
 	{ 3,	0,	sys_mprotect,		"mprotect"		}, /* 74 */
-	{ 0,	0,	sys_madvise,		"madvise"		}, /* 75 */
+	{ 3,	0,	sys_madvise,		"madvise"		}, /* 75 */
 	{ 0,	0,	sys_vhangup,		"vhangup"		}, /* 76 */
 	{ 5,	0,	printargs,		"osf_kmodcall"		}, /* 77, not implemented */
 	{ 5,	0,	printargs,		"osf_mincore"		}, /* 78, not implemented */
@@ -399,12 +399,12 @@
 	{ 2,	0,	sys_capget,		"capget"		}, /* 368 */
 	{ 2,	0,	sys_capset,		"capset"		}, /* 369 */
 	{ 4,	TD,	sys_sendfile,		"sendfile"		}, /* 370 */
-	{ 3,	0,	printargs,		"setresgid"		}, /* 371 */
-	{ 3,	0,	printargs,		"getresgid"		}, /* 372 */
+	{ 3,	0,	sys_setresgid,		"setresgid"		}, /* 371 */
+	{ 3,	0,	sys_getresgid,		"getresgid"		}, /* 372 */
 	{ 4,	0,	printargs,		"dipc"			}, /* 373, not implemented */
-	{ 2,	TF,	printargs,		"pivot_root"		}, /* 374 */
-	{ 3,	0,	printargs,		"mincore"		}, /* 375 */
-	{ 4,	0,	printargs,		"pciconfig_iobase"	}, /* 376 */
+	{ 2,	TF,	sys_pivotroot,		"pivot_root"		}, /* 374 */
+	{ 3,	0,	sys_mincore,		"mincore"		}, /* 375 */
+	{ 3,	0,	printargs,		"pciconfig_iobase"	}, /* 376 */
 	{ 4,	TD,	sys_getdents64,		"getdents64"		}, /* 377 */
 	{ 0,	0,	printargs,		"gettid"		}, /* 378 */
 	{ 4,	TD,	sys_readahead,		"readahead"		}, /* 379 */
--- strace-4.5.6/linux/sparc/syscallent.h.orig	2004-07-12 09:41:05.000000000 +0200
+++ strace-4.5.6/linux/sparc/syscallent.h	2004-07-26 08:21:58.496665928 +0200
@@ -80,7 +80,7 @@
 	{ 2,	0,	sys_getgroups,	"getgroups" },		/* 79 */
 	{ 2,	0,	sys_setgroups,	"setgroups" },		/* 80 */
 	{ 0,	0,	sys_getpgrp,	"getpgrp" },		/* 81 */
-	{ 2,	0,	sys_setgroups,	"setgroups32" },	/* 82 */
+	{ 2,	0,	sys_setgroups32,"setgroups32" },	/* 82 */
 	{ 3,	0,	sys_setitimer,	"setitimer" },		/* 83 */
 	{ 2,	0,	sys_ftruncate,	"ftruncate64" },	/* 84 */
 	{ 1,	TF,	sys_swapon,	"swapon" },		/* 85 */
@@ -113,7 +113,7 @@
 	{ 2,	TS,	sys_setresgid,	"setresgid32" },	/* 112 */
 	{ 5,	TN,	sys_recvmsg,	"recvmsg" },		/* 113 */
 	{ 5,	TN,	sys_sendmsg,	"sendmsg" },		/* 114 */
-	{ 2,	0,	sys_getgroups,	"getgroups32" },	/* 115 */
+	{ 2,	0,	sys_getgroups32,"getgroups32" },	/* 115 */
 	{ 2,	0,	sys_gettimeofday,"gettimeofday" },	/* 116 */
 	{ 2,	0,	sys_getrusage,	"getrusage" },		/* 117 */
 	{ 5,	TN,	sys_getsockopt,	"getsockopt" },		/* 118 */
diff -Nur strace-4.5.1.orig/linux/syscallent.h strace-4.5.1/linux/syscallent.h
--- strace-4.5.1.orig/linux/syscallent.h	2003-11-13 23:32:25.000000000 +0100
+++ strace-4.5.1/linux/syscallent.h	2003-11-18 21:43:16.371385776 +0100
@@ -248,7 +248,7 @@
 
 	{ 0,	0,	sys_getgid,		"getgid32"	}, /* 200 */
 	{ 0,	0,	sys_geteuid,		"geteuid32"	}, /* 201 */
-	{ 0,	0,	sys_geteuid,		"getegid32"	}, /* 202 */
+	{ 0,	0,	sys_getegid,		"getegid32"	}, /* 202 */
 	{ 2,	0,	sys_setreuid,		"setreuid32"	}, /* 203 */
 	{ 2,	0,	sys_setregid,		"setregid32"	}, /* 204 */
 	{ 2,	0,	sys_getgroups32,	"getgroups32"	}, /* 205 */
--- strace-4.5.1/linux/sparc/syscall.h.orig	2003-01-30 20:15:20.000000000 +0000
+++ strace-4.5.1/linux/sparc/syscall.h	2003-11-19 21:15:24.000000000 +0000
@@ -105,6 +105,7 @@
 int sys_rt_sigtimedwait(), sys_prctl(), sys_poll();
 int sys_sendfile(), sys_query_module(), sys_capget(), sys_capset();
 int sys_create_module(), sys_init_module();
+int sys_setgroups32(), sys_getgroups32();
 
 int	sys_umask();		/* XXX */
 
@@ -204,4 +205,14 @@
 int	sys_clock_getres(), sys_clock_nanosleep();
 int	sys_timer_create(), sys_timer_settime(), sys_timer_gettime();
 
+int	sys_io_setup(), sys_io_destroy(), sys_io_submit(), sys_io_cancel(), sys_io_getevents();
+int	sys_mq_open(), sys_mq_unlink(), sys_mq_timedsend(), sys_mq_timedreceive(), sys_mq_notify(), sys_mq_getsetattr();
+int	sys_waitid();
+int	sys_openat(), sys_mkdirat(), sys_mknodat(), sys_fchownat(), sys_futimesat(), sys_newfstatat(), sys_unlinkat(), sys_renameat(), sys_linkat(), sys_symlinkat(), sys_readlinkat(), sys_fchmodat(),	sys_faccessat();
+int	sys_pselect6(), sys_ppoll();
+int	sys_unshare();
+int	sys_move_pages(), sys_getcpu();
+int	sys_epoll_pwait();
+int	sys_signalfd(), sys_timerfd(), sys_eventfd();
+
 #include "syscall1.h"
-------------- next part --------------
--- strace-4.5.14/defs.h.orig	2006-01-12 11:18:53.000000000 +0100
+++ strace-4.5.14/defs.h	2006-01-21 22:59:49.045368750 +0100
@@ -193,14 +193,15 @@
 
 #ifdef LINUXSPARC
 #include <linux/a.out.h>
-#include <asm/psr.h>
 #define PERSONALITY0_WORDSIZE 4
 #define PERSONALITY1_WORDSIZE 4
 #undef  SUPPORTED_PERSONALITIES
 #if defined(SPARC64)
+#include <asm/psrcompat.h>
 #define SUPPORTED_PERSONALITIES 3
 #define PERSONALITY2_WORDSIZE 8
 #else
+#include <asm/psr.h>
 #define SUPPORTED_PERSONALITIES 2
 #endif /* SPARC64 */
 #endif /* LINUXSPARC */
--- strace-4.5.15/mem.c.orig	2006-12-13 19:57:23.000000000 +0000
+++ strace-4.5.15/mem.c	2007-04-16 19:56:59.687032000 +0000
@@ -541,7 +541,7 @@
 	return 0;
 }
 
-#if defined(ALPHA) || defined(FREEBSD) || defined(IA64) || defined(SUNOS4) || defined(SVR4)
+#if defined(ALPHA) || defined(FREEBSD) || defined(IA64) || defined(SUNOS4) || defined(SVR4) || defined(SPARC) || defined(SPARC64)
 int
 sys_getpagesize(tcp)
 struct tcb *tcp;


More information about the Strace-devel mailing list