This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
[PATCH] Configure support fro FreeBSD/i386
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [PATCH] Configure support fro FreeBSD/i386
- From: Mark Kettenis <kettenis at wins dot uva dot nl>
- Date: Thu, 25 May 2000 19:22:08 +0200
The necessary hooks were already present in i386bsd.c, but I didn't
check in the necessary configure support for the %fs and %gs
registers. I checked it in now.
Mark
2000-05-25 Mark Kettenis <kettenis@gnu.org>
* acconfig.h (HAVE_R_FS, HAVE_R_GS): Add.
* configure.in: Add checks for r_fs and r_gs members of
`struct reg'.
* config.in, configure: Regenerated.
Index: acconfig.h
===================================================================
RCS file: /cvs/src/src/gdb/acconfig.h,v
retrieving revision 1.6
diff -u -p -r1.6 acconfig.h
--- acconfig.h 2000/04/14 10:13:50 1.6
+++ acconfig.h 2000/05/25 17:15:15
@@ -1,6 +1,12 @@
/* Define if compiling on Solaris 7. */
#undef _MSE_INT_H
+/* Define if your struct reg has r_fs. */
+#undef HAVE_R_FS
+
+/* Define if your struct reg has r_gs. */
+#undef HAVE_R_GS
+
/* Define if pstatus_t type is available */
#undef HAVE_PSTATUS_T
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.27
diff -u -p -r1.27 configure.in
--- configure.in 2000/05/25 06:49:01 1.27
+++ configure.in 2000/05/25 17:15:15
@@ -111,6 +111,21 @@ AC_C_CONST
AC_CHECK_FUNCS(setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask)
AC_FUNC_ALLOCA
+# See if machine/reg.h supports the %fs and %gs i386 segment registers.
+# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
+AC_CACHE_CHECK([for r_fs in struct reg], gdb_cv_struct_r_fs,
+[AC_TRY_COMPILE([#include <machine/reg.h>], [struct reg r; r.r_fs;],
+gdb_cv_struct_r_fs=yes, gdb_cv_struct_r_fs=no)])
+if test $gdb_cv_struct_r_fs = yes; then
+ AC_DEFINE(HAVE_R_FS)
+fi
+AC_CACHE_CHECK([for r_gs in struct reg], gdb_cv_struct_r_gs,
+[AC_TRY_COMPILE([#include <machine/reg.h>], [struct reg r; r.r_gs;],
+gdb_cv_struct_r_gs=yes, gdb_cv_struct_r_gs=no)])
+if test $gdb_cv_struct_r_gs = yes; then
+ AC_DEFINE(HAVE_R_GS)
+fi
+
dnl See if ptrace.h provides the PTRACE_GETREGS request.
AC_MSG_CHECKING(for PTRACE_GETREGS)
AC_CACHE_VAL(gdb_cv_have_ptrace_getregs,