This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: problem compiling gdb5.0 on NetBSD-current i386 ELF
- To: Brett Lymn <blymn at baesystems dot com dot au>
- Subject: Re: problem compiling gdb5.0 on NetBSD-current i386 ELF
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 31 May 2000 20:35:56 +1000
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <200005311028.TAA26612@mallee.awadi>
Brett Lymn wrote:
>
> 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/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'
> 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.
Check gdb/config/nm-nbsd.h. gdb/config/i386/tm-nbsd.h would be
including it.
Andrew