[PATCH] Configure support fro FreeBSD/i386

Mark Kettenis kettenis@wins.uva.nl
Thu May 25 10:22:00 GMT 2000

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.


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 */
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)
+# 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_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
 dnl See if ptrace.h provides the PTRACE_GETREGS request.

More information about the Gdb-patches mailing list