Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Configure support fro FreeBSD/i386
@ 2000-05-25 10:22 Mark Kettenis
  0 siblings, 0 replies; only message in thread
From: Mark Kettenis @ 2000-05-25 10:22 UTC (permalink / raw)
  To: gdb-patches

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,
From cwalker@yahoo-inc.com Thu May 25 10:31:00 2000
From: "Chad Walker" <cwalker@yahoo-inc.com>
To: <gdb-patches@sourceware.cygnus.com>
Subject: GDB 5.0 on FreeBSD 3.4
Date: Thu, 25 May 2000 10:31:00 -0000
Message-id: <NDBBLPNLDMEJKCGPENEHGELECAAA.cwalker@yahoo-inc.com>
X-SW-Source: 2000-05/msg00396.html
Content-length: 3587

Hey guys,

I am having a problem building 5.0 on i386-unknown-freebsdelf3.4
In the file gdb-5.0/gdb/solib.c. It looks to me like there's some #define or
macro that is not right for elf based fbsd, and that's making it #include
the wrong file. Since I am not very familar with the gdb code, I thought I'd
ask here if anyone has come across it, or has a fbsd3.4 machine they could
try it on. Thanks for any suggestions.

-chad

Here's the output from gmake:
gcc -c -g -O2    -I. -I. -I./config -DHAVE_CONFIG_H -I./../include/opcode -I
./../readline/.. -I../bfd -I./../bfd  -I./../include -I../intl -I./../intl -
I./tui  -DUSE_INCLUDED_REGEX   solib.c
solib.c: In function `solib_map_sections':
solib.c:369: structure has no member named `som_addr'
solib.c:369: structure has no member named `som_addr'
solib.c:370: structure has no member named `som_addr'
solib.c:370: structure has no member named `som_addr'
solib.c: In function `solib_add_common_symbols':
solib.c:431: storage size of `inferior_rtc_symb' isn't known
solib.c: In function `first_link_map_member':
solib.c:896: sizeof applied to an incomplete type
solib.c:897: invalid use of undefined type `struct _dynamic'
solib.c:901: invalid use of undefined type `struct _dynamic'
solib.c:901: invalid use of undefined type `struct _dynamic'
solib.c:902: sizeof applied to an incomplete type
solib.c:903: invalid use of undefined type `struct section_dispatch_table'
solib.c:903: invalid use of undefined type `struct section_dispatch_table'
solib.c: In function `current_sos':
solib.c:1099: structure has no member named `som_next'
solib.c:1099: structure has no member named `som_next'
solib.c:1114: structure has no member named `som_path'
solib.c:1114: structure has no member named `som_path'
solib.c: In function `symbol_add_stub':
solib.c:1181: structure has no member named `som_addr'
solib.c:1181: structure has no member named `som_addr'
solib.c: In function `info_sharedlibrary_command':
solib.c:1508: structure has no member named `som_addr'
solib.c:1508: structure has no member named `som_addr'
solib.c: In function `solib_address':
solib.c:1555: structure has no member named `som_addr'
solib.c:1555: structure has no member named `som_addr'
solib.c: In function `disable_break':
solib.c:1662: sizeof applied to an incomplete type
solib.c:1668: invalid use of undefined type `struct so_debug'
solib.c:1668: invalid use of undefined type `struct so_debug'
solib.c:1669: invalid use of undefined type `struct so_debug'
solib.c:1670: invalid use of undefined type `struct so_debug'
solib.c: In function `enable_break':
solib.c:1754: sizeof applied to an incomplete type
solib.c:1763: invalid use of undefined type `struct _dynamic'
solib.c:1763: invalid use of undefined type `struct _dynamic'
solib.c:1767: invalid use of undefined type `struct so_debug'
solib.c: In function `special_symbol_handling':
solib.c:2053: sizeof applied to an incomplete type
solib.c:2064: invalid use of undefined type `struct _dynamic'
solib.c:2064: invalid use of undefined type `struct _dynamic'
solib.c:2071: sizeof applied to an incomplete type
solib.c:2077: invalid use of undefined type `struct so_debug'
solib.c:2079: invalid use of undefined type `struct so_debug'
solib.c:2079: invalid use of undefined type `struct so_debug'
solib.c: At top level:
solib.c:128: storage size of `dynamic_copy' isn't known
solib.c:129: storage size of `ld_2_copy' isn't known
solib.c:130: storage size of `debug_copy' isn't known
gmake[1]: *** [solib.o] Error 1
gmake[1]: Leaving directory `/home/cwalker/gdb-5.0/gdb'
gmake: *** [all-gdb] Error 2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-05-25 10:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-25 10:22 [PATCH] Configure support fro FreeBSD/i386 Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox