Re: Re: Can't build gdb-5.3: redefinition of `struct fpq', `struct fq', and `struct fpu'

[email protected]
Newsgroups gmane.linux.aurora.devel
Message-ID <[email protected]>
On Sat, Mar 01, 2003 at 11:42:02AM +0100, [email protected] wrote:
> On Thu, Feb 27, 2003 at 08:01:08PM +0100, [email protected] wrote:
> > On Thu, Feb 27, 2003 at 04:11:21PM +0100, Christian Joensson wrote:
> > > On Thu, Feb 27, 2003 at 04:13:07PM +0100, T. Ribbrock wrote:
> > > > On Thu, Feb 27, 2003 at 01:40:13PM +0100, Christian Joensson wrote:
> > > > > Aurora SPARC Linux 1.0 (Ansel) SS20 dual SuperSparc-(II) sun4m:
> 
> well, on the SS20, for target sparc-linux, I can compile
> gdb-5.3/gdb/sparc-nat.c if I *remove* the -D_XOPEN_SOURCE=500:
> 
> [chj@sparky gdb]$ gcc -c -O2 -m32 -mtune=ultrasparc    -I. -I/home/chj/gdb-5.3/gdb -I/home/chj/gdb-5.3/gdb/config -DLOCALEDIR="\"/usr/local/gcc-binutils/share/locale\"" -DHAVE_CONFIG_H -I/home/chj/gdb-5.3/gdb/../include/opcode -I/home/chj/gdb-5.3/gdb/../readline/.. -I../bfd -I/home/chj/gdb-5.3/gdb/../bfd  -I/home/chj/gdb-5.3/gdb/../include -I../intl -I/home/chj/gdb-5.3/gdb/../intl -D_BSD_SOURCE -D_LARGEFILE64_SOURCE  -DMI_OUT=1 -DUI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized  /home/chj/gdb-5.3/gdb/sparc-nat.c
> /home/chj/gdb-5.3/gdb/sparc-nat.c: In function `fetch_inferior_registers':
> /home/chj/gdb-5.3/gdb/sparc-nat.c:104: warning: implicit declaration of function `memcpy'
> [chj@sparky gdb]$ 
> 
> What does this -D_XOPEN_SOURCE=500 actually mean...
> 
> I will try the Ultra1 now for target sparc-linux and for
> sparc64-linux.

well, the Ultra1 for target sparc-linux, works as well, but I canÃ't
debug sparc64 binaries with it.

trying to build for target sparc64-linux gets me the basic problem
still:

[chj@u1sparc gdb]$ make
gcc -c -O2 -m64 -mtune=ultrasparc    -I. -I/home/chj/gdb-5.3/gdb -I/home/chj/gdb-5.3/gdb/config -DLOCALEDIR="\"/usr/local/gcc-binutils/share/locale\"" -DHAVE_CONFIG_H -I/home/chj/gdb-5.3/gdb/../include/opcode -I/home/chj/gdb-5.3/gdb/../readline/.. -I../bfd -I/home/chj/gdb-5.3/gdb/../bfd  -I/home/chj/gdb-5.3/gdb/../include -I../intl -I/home/chj/gdb-5.3/gdb/../intl -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE  -DMI_OUT=1 -DUI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized  /home/chj/gdb-5.3/gdb/sparc-nat.c
In file included from /usr/include/asm/reg.h:4,
                 from /home/chj/gdb-5.3/gdb/sparc-nat.c:36:
/usr/include/asm-sparc64/reg.h:49: redefinition of `struct fpu'
/home/chj/gdb-5.3/gdb/sparc-nat.c: In function `fetch_inferior_registers':
/home/chj/gdb-5.3/gdb/sparc-nat.c:99: warning: cast from pointer to integer of different size
/home/chj/gdb-5.3/gdb/sparc-nat.c:103: warning: implicit declaration of function `memcpy'
/home/chj/gdb-5.3/gdb/sparc-nat.c:105: structure has no member named `r_ps'
/home/chj/gdb-5.3/gdb/sparc-nat.c:106: structure has no member named `r_pc'
/home/chj/gdb-5.3/gdb/sparc-nat.c:107: structure has no member named `r_npc'
/home/chj/gdb-5.3/gdb/sparc-nat.c:129: warning: cast from pointer to integer of different size
/home/chj/gdb-5.3/gdb/sparc-nat.c: In function `store_inferior_registers':
/home/chj/gdb-5.3/gdb/sparc-nat.c:254: structure has no member named `r_ps'
/home/chj/gdb-5.3/gdb/sparc-nat.c:256: structure has no member named `r_pc'
/home/chj/gdb-5.3/gdb/sparc-nat.c:258: structure has no member named `r_npc'
/home/chj/gdb-5.3/gdb/sparc-nat.c:264: warning: cast from pointer to integer of different size
/home/chj/gdb-5.3/gdb/sparc-nat.c:278: warning: cast from pointer to integer of different size
/home/chj/gdb-5.3/gdb/sparc-nat.c: In function `fetch_core_registers':
/home/chj/gdb-5.3/gdb/sparc-nat.c:312: structure has no member named `r_ps'
/home/chj/gdb-5.3/gdb/sparc-nat.c:313: structure has no member named `r_pc'
/home/chj/gdb-5.3/gdb/sparc-nat.c:314: structure has no member named `r_npc'
make: *** [sparc-nat.o] Error 1
[chj@u1sparc gdb]$ gcc -c -O2 -m64 -mtune=ultrasparc    -I. -I/home/chj/gdb-5.3/gdb -I/home/chj/gdb-5.3/gdb/config -DLOCALEDIR="\"/usr/local/gcc-binutils/share/locale\"" -DHAVE_CONFIG_H -I/home/chj/gdb-5.3/gdb/../include/opcode -I/home/chj/gdb-5.3/gdb/../readline/.. -I../bfd -I/home/chj/gdb-5.3/gdb/../bfd  -I/home/chj/gdb-5.3/gdb/../include -I../intl -I/home/chj/gdb-5.3/gdb/../intl -D_BSD_SOURCE -D_LARGEFILE64_SOURCE  -DMI_OUT=1 -DUI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized  /home/chj/gdb-5.3/gdb/sparc-nat.c
/home/chj/gdb-5.3/gdb/sparc-nat.c: In function `fetch_inferior_registers':
/home/chj/gdb-5.3/gdb/sparc-nat.c:99: warning: cast from pointer to integer of different size
/home/chj/gdb-5.3/gdb/sparc-nat.c:103: warning: implicit declaration of function `memcpy'
/home/chj/gdb-5.3/gdb/sparc-nat.c:105: structure has no member named `r_ps'
/home/chj/gdb-5.3/gdb/sparc-nat.c:106: structure has no member named `r_pc'
/home/chj/gdb-5.3/gdb/sparc-nat.c:107: structure has no member named `r_npc'
/home/chj/gdb-5.3/gdb/sparc-nat.c:129: warning: cast from pointer to integer of different size
/home/chj/gdb-5.3/gdb/sparc-nat.c: In function `store_inferior_registers':
/home/chj/gdb-5.3/gdb/sparc-nat.c:254: structure has no member named `r_ps'
/home/chj/gdb-5.3/gdb/sparc-nat.c:256: structure has no member named `r_pc'
/home/chj/gdb-5.3/gdb/sparc-nat.c:258: structure has no member named `r_npc'
/home/chj/gdb-5.3/gdb/sparc-nat.c:264: warning: cast from pointer to integer of different size
/home/chj/gdb-5.3/gdb/sparc-nat.c:278: warning: cast from pointer to integer of different size
/home/chj/gdb-5.3/gdb/sparc-nat.c: In function `fetch_core_registers':
/home/chj/gdb-5.3/gdb/sparc-nat.c:312: structure has no member named `r_ps'
/home/chj/gdb-5.3/gdb/sparc-nat.c:313: structure has no member named `r_pc'
/home/chj/gdb-5.3/gdb/sparc-nat.c:314: structure has no member named `r_npc'

So, I'm still at square one...

Anyone else interested in being able to debug sparc64-linux binaries?
:-)

Cheers,

/ChJ
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.