[PATCH] Use new Linux threads support for Linux/Alpha

Kevin Buettner kevinb@cygnus.com
Tue Mar 20 13:55:00 GMT 2001


I've just checked in the following patch.  I've done a test build and
some minimal testing on alphaev6-unknown-linux-gnu.  There is no
Linux/Alpha GDB maintainer, so I'm regarding this as an obvious fix
since the same changes have been made to other GDB ports for GNU/Linux
running on other architectures.

	* config/alpha/alpha-linux.mh (NATDEPFILES): Use proc-service.o,
	thread-db.o, and lin-lwp.o for thread support instead of
	linux-thread.o and lin-thread.o.
	* config/alpha/nm-linux.h (PREPARE_TO_PROCEED, GET_THREAD_SIGNALS)
	(ATTACH_LWP): Define to use the following lin-lwp.c functions...
	(lin_lwp_prepare_to_proceed, lin_thread_get_thread_signals)
	(lin_lwp_attach_lwp): Declare.

Index: config/alpha/alpha-linux.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/alpha/alpha-linux.mh,v
retrieving revision 1.5
diff -u -p -r1.5 alpha-linux.mh
--- alpha-linux.mh	2000/10/30 22:33:32	1.5
+++ alpha-linux.mh	2001/03/20 21:29:57
@@ -3,7 +3,7 @@ XDEPFILES=
 XM_FILE= xm-alphalinux.h
 NAT_FILE= nm-linux.h
 NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o \
-	fork-child.o linux-thread.o lin-thread.o 
+	fork-child.o proc-service.o thread-db.o lin-lwp.o
 
 LOADLIBES = -ldl -rdynamic
 
Index: config/alpha/nm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/alpha/nm-linux.h,v
retrieving revision 1.3
diff -u -p -r1.3 nm-linux.h
--- nm-linux.h	2001/03/06 08:21:21	1.3
+++ nm-linux.h	2001/03/20 21:29:57
@@ -66,4 +66,20 @@ extern int get_longjmp_target (CORE_ADDR
    pointer to the first register.  */
 #define ALPHA_REGSET_BASE(regsetp)  ((long *) (regsetp))
 
+/* FIXME: kettenis/2000-09-03: This should be moved to ../nm-linux.h
+   once we have converted all Linux targets to use the new threads
+   stuff (without the #undef of course).  */
+
+extern int lin_lwp_prepare_to_proceed (void);
+#undef PREPARE_TO_PROCEED
+#define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed ()
+
+extern void lin_lwp_attach_lwp (int pid, int verbose);
+#define ATTACH_LWP(pid, verbose) lin_lwp_attach_lwp ((pid), (verbose))
+
+#include <signal.h>
+
+extern void lin_thread_get_thread_signals (sigset_t *mask);
+#define GET_THREAD_SIGNALS(mask) lin_thread_get_thread_signals (mask)
+
 #endif /* NM_LINUX_H */



More information about the Gdb-patches mailing list