This is the mail archive of the gdb-patches@sourceware.cygnus.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]

problem compiling gdb5.0 on NetBSD-current i386 ELF



Folks,
        I just attempted to compile gdb5.0 on a NetBSD-current i386
ELF machine and the thing fell over compiling gdb/solib.c.  The uname
of my machine gives:

NetBSD siren 1.4X NetBSD 1.4X (SKEL) #0: Mon May 15 18:20:37 CST 2000
   toor@siren:/usr/src/sys/arch/i386/compile/SKEL i386

My gcc version is this:

gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)

and the errors I get are these:

gmake[1]: Entering directory `/usr/local/src/gdb-5.0/libiberty'
gmake[2]: Entering directory `/usr/local/src/gdb-5.0/libiberty/testsuite'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/usr/local/src/gdb-5.0/libiberty/testsuite'
gmake[1]: Leaving directory `/usr/local/src/gdb-5.0/libiberty'
gmake[1]: Entering directory `/usr/local/src/gdb-5.0/intl'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/usr/local/src/gdb-5.0/intl'
gmake[1]: Entering directory `/usr/local/src/gdb-5.0/bfd'
gmake  all-recursive
gmake[2]: Entering directory `/usr/local/src/gdb-5.0/bfd'
Making all in doc
gmake[3]: Entering directory `/usr/local/src/gdb-5.0/bfd/doc'
gmake[3]: Nothing to be done for `all'.
gmake[3]: Leaving directory `/usr/local/src/gdb-5.0/bfd/doc'
Making all in po
gmake[3]: Entering directory `/usr/local/src/gdb-5.0/bfd/po'
gmake[3]: Nothing to be done for `all'.
gmake[3]: Leaving directory `/usr/local/src/gdb-5.0/bfd/po'
gmake[3]: Entering directory `/usr/local/src/gdb-5.0/bfd'
gmake[3]: Nothing to be done for `all-am'.
gmake[3]: Leaving directory `/usr/local/src/gdb-5.0/bfd'
gmake[2]: Leaving directory `/usr/local/src/gdb-5.0/bfd'
gmake[1]: Leaving directory `/usr/local/src/gdb-5.0/bfd'
gmake[1]: Entering directory `/usr/local/src/gdb-5.0/opcodes'
gmake  all-recursive
gmake[2]: Entering directory `/usr/local/src/gdb-5.0/opcodes'
Making all in po
gmake[3]: Entering directory `/usr/local/src/gdb-5.0/opcodes/po'
gmake[3]: Nothing to be done for `all'.
gmake[3]: Leaving directory `/usr/local/src/gdb-5.0/opcodes/po'
gmake[3]: Entering directory `/usr/local/src/gdb-5.0/opcodes'
gmake[3]: Nothing to be done for `all-am'.
gmake[3]: Leaving directory `/usr/local/src/gdb-5.0/opcodes'
gmake[2]: Leaving directory `/usr/local/src/gdb-5.0/opcodes'
gmake[1]: Leaving directory `/usr/local/src/gdb-5.0/opcodes'
gmake[1]: Entering directory `/usr/local/src/gdb-5.0/etc'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/usr/local/src/gdb-5.0/etc'
gmake[1]: Entering directory `/usr/local/src/gdb-5.0/mmalloc'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/usr/local/src/gdb-5.0/mmalloc'
gmake[1]: Entering directory `/usr/local/src/gdb-5.0/readline'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/usr/local/src/gdb-5.0/readline'
gmake[1]: Entering directory `/usr/local/src/gdb-5.0/sim'
gmake[1]: Leaving directory `/usr/local/src/gdb-5.0/sim'
gmake[1]: Entering directory `/usr/local/src/gdb-5.0/gdb'
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 `/usr/local/src/gdb-5.0/gdb'
gmake: *** [all-gdb] Error 2


The interesting thing about this is if I look at the lines that have
the error about som_addr on them I see this:

      p->addr += LM_ADDR (so);

which use these defines from the top of the file:

#define SOLIB_EXTRACT_ADDRESS(member) \
  extract_address (&member, sizeof (member))

#ifndef SVR4_SHARED_LIBS

#define LM_ADDR(so) (SOLIB_EXTRACT_ADDRESS ((so) -> lm.lm_addr))


_but_ if I look at the preprocessor output I see:

      p->addr += (extract_address (& ( so ) -> lm. som_addr  , sizeof
( ( so ) -> lm. som_addr  )) ) ;


somehow the lm_addr's have been changed into som_addr which is very odd.

-- 
===============================================================================
Brett Lymn, Computer Systems Administrator, BAE SYSTEMS
===============================================================================



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