This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
RE: Building gdb on 64bit solaris
- From: "Chu, Josh" <josh dot chu at retek dot com>
- To: 'Andrew Cagney' <ac131313 at ges dot redhat dot com>
- Cc: "'gdb at sources dot redhat dot com'" <gdb at sources dot redhat dot com>, Kun Li <likun at asiainfo dot com>
- Date: Thu, 27 Jun 2002 08:41:33 -0500
- Subject: RE: Building gdb on 64bit solaris
Well one thing I did try was to comment out the offending lines in
core-sol2.c :
(from function fetch_core_registers, commenting out lines 63-87) :
...
/*
else if (core_reg_size == sizeof (struct regs))
{
#define gregs ((struct regs *)core_reg_sect)
*(int *) ®isters[REGISTER_BYTE (0)] = 0;
memcpy (®isters[REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1,
15 * REGISTER_RAW_SIZE (G1_REGNUM));
*(int *) ®isters[REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps;
*(int *) ®isters[REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc;
*(int *) ®isters[REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc;
*(int *) ®isters[REGISTER_BYTE (Y_REGNUM)] = gregs->r_y;
{
int sp;
sp = *(int *) ®isters[REGISTER_BYTE (SP_REGNUM)];
if (0 != target_read_memory (sp,
®isters[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE
(L0_REGNUM)))
{
warning ("couldn't read input and local registers from core
file
\n");
}
}
}
*/
...
I then tried to rebuild and it compiled and linked just fine. Of course
these lines are very critical to gdb, and it is unable to read the 64-bit
executable if the lines are commented-out.
Does anyone know if this code could be altered so the below error doesn't
occur?
Andrew, I'll give a shot at the latest, but in any case I'll be in bad shape
since I'm using a patched version of gdb for the KAI c++ compiler, which
happens to only support gdb 5.0...worst case is I'll have to modify the new
source myself.
Thanks again
--JC
-----Original Message-----
From: Andrew Cagney [mailto:ac131313@ges.redhat.com]
Sent: Wednesday, June 26, 2002 10:10 PM
To: Chu, Josh
Cc: 'gdb@sources.redhat.com'; Kun Li
Subject: Re: Building gdb on 64bit solaris
Could you please download than try GDB 5.2 or better a current snapshot
of GDB. See http://sources.redhat.com/gdb/current/ . From other
comments, it apparently doesn't build. However, if you can post the
details or look closer, it may be possible to figure out what is going
wrong.
Andrew
> I have compiled gcc for 64bit solaris and attempted a compile of gdb.
> I ran ./configure followed by 'make' and the compilation stops when trying
> to compile core-sol2.c.
> Here's my output :
> ...
> gcc -m64 -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
> ser-pipe.c
> gcc -m64 -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
> corelow.c
> gcc -m64 -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
> core-sol2.c
> core-sol2.c: In function `fetch_core_registers':
> core-sol2.c:62: sizeof applied to an incomplete type
> core-sol2.c:69: dereferencing pointer to incomplete type
> core-sol2.c:71: dereferencing pointer to incomplete type
> core-sol2.c:72: dereferencing pointer to incomplete type
> core-sol2.c:73: dereferencing pointer to incomplete type
> core-sol2.c:74: dereferencing pointer to incomplete type
> *** Error code 1
> make: Fatal error: Command failed for target `core-sol2.o'
> Current working directory /files0/retl/tools/share/gdb/gdb-5.0/gdb
> *** Error code 1
> make: Fatal error: Command failed for target `all-gdb'
> (/files0/retl/tools/share/gdb/gdb-5.0)$ uname -a
> SunOS mspdev25 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-80
> (/files0/retl/tools/share/gdb/gdb-5.0)$ echo $CC
> gcc -m64
> (/files0/retl/tools/share/gdb/gdb-5.0)$ file `which gcc`
> /files0/retl/tools/gcc/bin/gcc: ELF 64-bit MSB executable SPARCV9 Version
1,
> dynamically linked, not stripped
>
> Any idea why I am getting these errors? Is this a known problem when
> compiling 64bit solaris?
> Thanks!
> --JC
>