public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Building gdb on 64bit solaris
@ 2002-06-25 13:09 Chu, Josh
  2002-06-26 20:10 ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: Chu, Josh @ 2002-06-25 13:09 UTC (permalink / raw)
  To: 'gdb@sources.redhat.com'

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Building gdb on 64bit solaris
  2002-06-25 13:09 Building gdb on 64bit solaris Chu, Josh
@ 2002-06-26 20:10 ` Andrew Cagney
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2002-06-26 20:10 UTC (permalink / raw)
  To: Chu, Josh; +Cc: 'gdb@sources.redhat.com', Kun Li

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
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Building gdb on 64bit solaris
@ 2002-06-27  7:23 Chu, Josh
  0 siblings, 0 replies; 4+ messages in thread
From: Chu, Josh @ 2002-06-27  7:23 UTC (permalink / raw)
  To: 'Andrew Cagney'; +Cc: 'gdb@sources.redhat.com', Kun Li

Ok, I downloaded 5.2, and everything built fine for 64-bit (although I'm
still going to have to modify source code to make this work with EDG
demangling)
Here's the steps I followed (ksh):

1) export CC='gcc -m64'
2) ./configure --prefix=<INSTALL DIR>
3) make
4) make install

This worked just fine.  I will be working on getting 5.2 to work with the
Kai C++ compiler so it can demangle the names properly, and I will mail that
to the Intel/Kai folks so they can hopefully post that on a website
somewhere for any Kai C++/KCC users
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
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Building gdb on 64bit solaris
@ 2002-06-27  6:42 Chu, Josh
  0 siblings, 0 replies; 4+ messages in thread
From: Chu, Josh @ 2002-06-27  6:42 UTC (permalink / raw)
  To: 'Andrew Cagney'; +Cc: 'gdb@sources.redhat.com', Kun Li

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 *) &registers[REGISTER_BYTE (0)] = 0;

          memcpy (&registers[REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1,
                  15 * REGISTER_RAW_SIZE (G1_REGNUM));
          *(int *) &registers[REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps;
          *(int *) &registers[REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc;
          *(int *) &registers[REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc;
          *(int *) &registers[REGISTER_BYTE (Y_REGNUM)] = gregs->r_y;

          {
            int sp;

            sp = *(int *) &registers[REGISTER_BYTE (SP_REGNUM)];
            if (0 != target_read_memory (sp,
                                      &registers[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
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-06-27 14:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-25 13:09 Building gdb on 64bit solaris Chu, Josh
2002-06-26 20:10 ` Andrew Cagney
2002-06-27  6:42 Chu, Josh
2002-06-27  7:23 Chu, Josh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).