[PATCH][RFC] strace fails to compile on glibc-2.5/MIPS

Hiroki Kaminaga kaminaga at sm.sony.co.jp
Wed Jan 24 04:17:53 UTC 2007


glibc-2.5 for MIPS has different member in struct sigcontext from
former version, and strace relys on former version. If you compile
strace with glibc-2.5 for mips, you get error:

../signal.c: In function 'sys_sigreturn':
../signal.c:1423: error: 'struct sigcontext' has no member named 'sc_sigset'

Below is the patch I used to compile strace with glibc-2.5 for mips,
however, this is an adhoc patch, and breaks for former glibc ...

Best Regards,

(Hiroki Kaminaga)

Index: strace-4.5.14-mips/signal.c
--- strace-4.5.14-mips.orig/signal.c
+++ strace-4.5.14-mips/signal.c
@@ -1420,7 +1420,7 @@ struct tcb *tcp;
 		if (umove(tcp, sp, &sc) < 0)
 		  	return 0;
 		tcp->u_arg[0] = 1;
-		tcp->u_arg[1] = sc.sc_sigset;
+		tcp->u_arg[1] = sc.sc_hi2;
 	} else {
 	  	tcp->u_rval = tcp->u_error = 0;
 		if(tcp->u_arg[0] == 0)

More information about the Strace-devel mailing list