This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
[robertl@sco.com: threads RH6/Sparc vs. GDB]
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [robertl@sco.com: threads RH6/Sparc vs. GDB]
- From: Jim Kingdon <kingdon at redhat dot com>
- Date: Sun, 31 Oct 1999 19:48:26 -0500
- CC: robertl at sco dot com
The following looks OK to me (well, I haven't looked into the ptrace
header lossage stuff but I can tell you we are shipping a similar
patch).
------- Start of forwarded message -------
Return-Path: <robertl@sco.com>
Date: Fri, 29 Oct 1999 17:22:51 -0500
From: Robert Lipe <robertl@sco.com>
To: kingdon@redhat.com
Subject: threads RH6/Sparc vs. GDB
Content-Type: text/plain; charset=us-ascii
Hi, Jim.
I hope everything is going well for you at your new gig. I had a reason
to revisit my threaded app on RH6.0/Sparc with GDB. With minor mods
to the code in the GDB tree that I flagtrantly (attached) cabbaged
from your work, GDB no longer goes completely down in flames. I offer
these under the "trivial and obvious" clause in hope that you see a
way to stick these someplace so that each Linux port isn't left to
fend for thier own. (Since I have only a lowly classic, builds are
really painful for me. I suppose I could cross build it from a modern
computer, but I don't know that would really be any faster once I got
done screwing around with libraries and headers...)
. . .
I now see the tell-tale
[New Thread 18244 (manager thread)]
[New Thread 18239 (initial thread)]
[New Thread 18245]
messages at startup. Stack traces are toast, but things are much more
resonable right now.
So consider those patches as an improvement. I didn't include a changelog
becuase, well, they're your code. :-)
. . .
Thanx for any help you can offer.
RJL
Index: infptrace.c
===================================================================
RCS file: /cvs/gdb/gdb/gdb/infptrace.c,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 infptrace.c
- --- infptrace.c 1999/08/09 21:33:34 1.1.1.3
+++ infptrace.c 1999/10/29 22:10:41
@@ -40,6 +40,10 @@
#include <ptrace.h>
#else
#ifdef HAVE_SYS_PTRACE_H
+#undef PTRACE_GETREGS
+#undef PTRACE_SETREGS
+#undef PTRACE_GETFPREGS
+#undef PTRACE_SETFPREGS
#include <sys/ptrace.h>
#endif
#endif
Index: sparc-nat.c
===================================================================
RCS file: /cvs/gdb/gdb/gdb/sparc-nat.c,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 sparc-nat.c
- --- sparc-nat.c 1999/10/05 23:08:51 1.1.1.3
+++ sparc-nat.c 1999/10/29 22:10:43
@@ -24,6 +24,10 @@
#include "gdbcore.h"
#include <signal.h>
+#undef PTRACE_GETREGS
+#undef PTRACE_SETREGS
+#undef PTRACE_GETFPREGS
+#undef PTRACE_SETFPREGS
#include <sys/ptrace.h>
#include <sys/wait.h>
#ifdef __linux__
Index: config/sparc/linux.mh
===================================================================
RCS file: /cvs/gdb/gdb/gdb/config/sparc/linux.mh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 linux.mh
- --- linux.mh 1999/04/16 01:34:25 1.1.1.1
+++ linux.mh 1999/10/29 22:10:43
@@ -2,6 +2,6 @@
XDEPFILES= ser-tcp.o
XM_FILE= xm-linux.h
NAT_FILE= nm-linux.h
- -NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o linux-thread.o
HOST_IPC=-DBSD_IPC
GDBSERVER_DEPFILES= low-sparc.o
Index: config/sparc/nm-linux.h
===================================================================
RCS file: /cvs/gdb/gdb/gdb/config/sparc/nm-linux.h,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 nm-linux.h
- --- nm-linux.h 1999/07/07 20:17:01 1.1.1.2
+++ nm-linux.h 1999/10/29 22:10:43
@@ -30,3 +30,22 @@ extern int kernel_u_size PARAMS ((void))
/* Linux is svr4ish but not that much */
#undef USE_PROC_FS
+
+/* Support for the glibc linuxthreads package. */
+
+#ifdef __STDC__
+struct objfile;
+#endif
+
+extern void
+linuxthreads_new_objfile PARAMS ((struct objfile *objfile));
+#define target_new_objfile(OBJFILE) linuxthreads_new_objfile (OBJFILE)
+
+extern char *
+linuxthreads_pid_to_str PARAMS ((int pid));
+#define target_pid_to_str(PID) linuxthreads_pid_to_str (PID)
+
+extern int
+linuxthreads_prepare_to_proceed PARAMS ((int step));
+#define PREPARE_TO_PROCEED(select_it) linuxthreads_prepare_to_proceed (1)
+
Index: config/sparc/tm-linux.h
===================================================================
RCS file: /cvs/gdb/gdb/gdb/config/sparc/tm-linux.h,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 tm-linux.h
- --- tm-linux.h 1999/07/07 20:17:06 1.1.1.2
+++ tm-linux.h 1999/10/29 22:10:43
@@ -21,6 +21,19 @@
#ifndef TM_SPARCLINUX_H
#define TM_SPARCLINUX_H
+/* Some versions of Linux have real-time signal support in the C library, and
+ some don't. We have to include this file to find out. */
+#include <signal.h>
+
+#ifdef __SIGRTMIN
+#define REALTIME_LO __SIGRTMIN
+#define REALTIME_HI (__SIGRTMAX + 1)
+#else
+#define REALTIME_LO 32
+#define REALTIME_HI 64
+#endif
+
+
#include "sparc/tm-sparc.h"
#define SIGCONTEXT_PC_OFFSET 12
------- End of forwarded message -------