strace (was Re: libc6 select problems?)
> > Thanks. Since then I've also noticed that the
> > vger.rutgers.edu:/pub/linux/Sparc/userland has a sparc strace rpm...
> That RPM is the same one as at the nuclecu site.
Working with the strace-3.1 sources from vger, I found that they sort
of work with libc6. There were a couple of little glitches (PEEKUSR
vs. PEEKUSER), a major bug in libc6-dev (linux/socket.h and
bits/socket.h have *totally conflicting* definitions of SOCK_*, MSG_*,
and structs sockaddr, msghdr, and at least one other. The definitions
are an enum in bits/socket.h but #defines in linux/socket.h... and
funny, the C compiler doesn't like enum { 1 = 1; } very much :-)
and lastly, strace (mem.c) needs some definitions from asm/mmap.h,
that *aren't* in bits/mmap.h, but it only includes sys/mmap.h which
now gets the latter. Anyway, I include the diffs to strace itself
here; you should be able to figure out what to patch out of
/usr/include/linux/socket.h yourself [I *suspect* that if you kill
everything after the 3 #include's at the beginning it will be correct,
but I leave that to others to get right.] If you can't get it to
build, http://www.kitten.gen.ma.us/me/sparc-linux-strace.exe
temporarily has a copy of the binary (244K, over a 28.8 link - be
patient or don't bother :-)
_Mark_ <eichin@kitten.gen.ma.us>
The Herd of Kittens
diff -wurp strace-3.1.orig/defs.h strace-3.1/defs.h
--- strace-3.1.orig/defs.h Tue Jul 30 01:00:58 1996
+++ strace-3.1/defs.h Mon Jan 5 14:57:44 1998
@@ -86,8 +86,10 @@ extern int ptrace();
#endif /* !SVR4 */
#ifdef LINUX
+#ifndef __sparc__ /* eichin */
#define PTRACE_PEEKUSER PTRACE_PEEKUSR
#define PTRACE_POKEUSER PTRACE_POKEUSR
+#endif
#ifdef ALPHA
#define REG_R0 0
#define REG_A0 16
diff -wurp strace-3.1.orig/mem.c strace-3.1/mem.c
--- strace-3.1.orig/mem.c Tue Sep 17 19:08:53 1996
+++ strace-3.1/mem.c Tue Jan 6 03:21:40 1998
@@ -32,6 +32,7 @@
#include "defs.h"
#include <sys/mman.h>
+#include <asm/mman.h> /* eichin -- gets sunos stuff not in bits/mman.h? */
int
sys_brk(tcp)
diff -wurp strace-3.1.orig/process.c strace-3.1/process.c
--- strace-3.1.orig/process.c Tue Jul 30 01:00:59 1996
+++ strace-3.1/process.c Mon Jan 5 15:07:56 1998
@@ -1145,7 +1145,9 @@ struct tcb *tcp;
tprintf("machine=\"%s\"", uname.machine);
#ifdef LINUX
#ifndef ALPHA
+#ifndef SPARC
tprintf(", domainname=\"%s\"", uname.domainname);
+#endif /* SPARC */
#endif /* ALPHA */
#endif /* LINUX */
tprintf("}");
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-sparc-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: