This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add autoconf check for td_pcb


This adds an autoconf check to see whether <sys/proc.h> defines a
`struct thread' with a td_pcb member.  If so, bsd-kvm.c will use it to
support FreeBSD 5.

Committed,

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>
 
	* configure.in: Check for td_pcb in `struct thread'.
	* configure, config.in: Regenerated.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.154
diff -u -p -r1.154 configure.in
--- configure.in 12 May 2004 23:14:49 -0000 1.154
+++ configure.in 23 May 2004 09:19:40 -0000
@@ -494,6 +494,15 @@ if test "$gdb_with_regex" = yes; then
     [Define to 1 if the regex included in libiberty should be used.])
 fi
 
+# See if <sys/proc.h> defines `struct thread' with a td_pcb member.
+AC_CACHE_CHECK([for td_pcb in struct thread], gdb_cv_struct_thread_td_pcb,
+[AC_TRY_COMPILE([#include <sys/proc.h>], [struct thread td; td.td_pcb;],
+gdb_cv_struct_thread_td_pcb=yes, gdb_cv_struct_thread_td_pcb=no)])
+if test $gdb_cv_struct_thread_td_pcb = yes; then
+  AC_DEFINE(HAVE_STRUCT_THREAD_TD_PCB, 1,
+            [Define to 1 if your system has td_pcb in struct thread.])
+fi
+
 # See if <machine/reg.h> degines `struct reg'.
 AC_CACHE_CHECK([for struct reg in machine/reg.h], gdb_cv_struct_reg,
 [AC_TRY_COMPILE([#include <sys/types.h>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]