* GDB on Solaris 10
@ 2008-08-05 16:58 Gareth Williams
2008-08-05 19:08 ` Joel Brobecker
0 siblings, 1 reply; 4+ messages in thread
From: Gareth Williams @ 2008-08-05 16:58 UTC (permalink / raw)
To: gdb
Does anyone have GDB working on Solaris 10?
I have installed GDB 6.6 from http://www.sunfreeware.com. This works for
'hello world' but not for the multi-threaded application I need to
debug. The problem is essentially that described in problem report 2481:
http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&databas
e=gdb&pr=2481
We also have compiled GDB 6.8 from source - and this does not work even
for 'hello world'.
bash-3.00$ gdb ./hello
GNU gdb 6.8
...
This GDB was configured as "sparc-sun-solaris2.10"...
(gdb) break main
Breakpoint 1 at 0x10c60: file hello.cc, line 6.
(gdb) r
Starting program: /home/williamsg/hello
procfs: init_inferior, get_traced_signals line 4891, /proc/18409: Error
0.
(gdb) where
procfs: fetch_registers, get_gregs line 3768, /proc/18409: Error 0.
procfs: fetch_registers, get_gregs line 3768, /proc/18409: Error 0.
(gdb)
So: does anyone have any version of GDB working on Solaris 10, for
threaded applications?
If so a hint would be nice :-) If not, is anyone interested in getting
it working? I may be able to spend a few days on this. Some pointers in
the right direction would really help.
cheers
Gareth Williams
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB on Solaris 10
2008-08-05 16:58 GDB on Solaris 10 Gareth Williams
@ 2008-08-05 19:08 ` Joel Brobecker
2008-08-06 17:07 ` Gareth Williams
0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2008-08-05 19:08 UTC (permalink / raw)
To: Gareth Williams; +Cc: gdb
> Does anyone have GDB working on Solaris 10?
Yes - we build GDB 6.8 on Solaris 10 for both 32 and 64 bits.
We don't do anything particular to get it working, though, so
I'm not sure what the problem might be in your case.
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: GDB on Solaris 10
2008-08-05 19:08 ` Joel Brobecker
@ 2008-08-06 17:07 ` Gareth Williams
2008-08-07 10:39 ` Joel Brobecker
0 siblings, 1 reply; 4+ messages in thread
From: Gareth Williams @ 2008-08-06 17:07 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb
Thanks, Joel, on the strength of that I tried it again.
I got GDB 6.8 working for 32-bits just by fixing the warning mentioned
in problem report 2481. The issue described there, I now think is due to
trying to debug a 64-bit application with a 32-bit GDB. (That is what I
was doing and I saw the same errors). This is explained here:
http://sourceware.org/ml/gdb/2001-01/msg00195.html
Building GDB for 64-bit was the problem. By googling I found out to try
> CC="gcc -m64" ./configure
Is that the recommended method? I can't find this in the GDB
documentation.
There are various sparc64 targets in the Makefiles, so I tried things
like
> ./configure --target=sparc64-sun-solaris2.10
But this just seems to give it a different label. (Or do I need both?)
Is there a list of valid targets anywhere?
There must be something clever going on behind the scenes because the
link lines for 32-bit and 64-bit (when using CC="gcc -m64") are quite
different.
With 64-bit I got complaints about undefined symbols wattr_on and
wattr_off in the curses library, which is not a problem for the default
32-bit compile.
Some more googling led me to:
> CC="gcc -m64" ./configure --disable-tui
> make
And I have a 64-bit GDB that kind of works! So thanks again for the
help.
For future reference I would be interested to know if this is the right
way to compile 64-bit on Solaris, and (unless I have missed it) perhaps
it needs to be documented somewhere?
cheers
Gareth Williams
-----Original Message-----
From: Joel Brobecker [mailto:brobecker@adacore.com]
Sent: 05 August 2008 20:08
To: Gareth Williams
Cc: gdb@sourceware.org
Subject: Re: GDB on Solaris 10
> Does anyone have GDB working on Solaris 10?
Yes - we build GDB 6.8 on Solaris 10 for both 32 and 64 bits.
We don't do anything particular to get it working, though, so
I'm not sure what the problem might be in your case.
--
Joel
> Does anyone have GDB working on Solaris 10?
>
> I have installed GDB 6.6 from http://www.sunfreeware.com. This works
for > > 'hello world' but not for the multi-threaded application I need
to debug. > The problem is essentially that described in problem report
2481:
>
> http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit->
trail&database=gdb&pr=2481
>
> We also have compiled GDB 6.8 from source - and this does not work
even for 'hello world'.
>
> bash-3.00$ gdb ./hello
>
> GNU gdb 6.8
> ...
> This GDB was configured as "sparc-sun-solaris2.10"...
> (gdb) break main
> Breakpoint 1 at 0x10c60: file hello.cc, line 6.
> (gdb) r
> Starting program: /home/williamsg/hello
> procfs: init_inferior, get_traced_signals line 4891, /proc/18409:
Error 0.
> (gdb) where
> procfs: fetch_registers, get_gregs line 3768, /proc/18409: Error 0.
> procfs: fetch_registers, get_gregs line 3768, /proc/18409: Error 0.
> (gdb)
>
> So: does anyone have any version of GDB working on Solaris 10, for
threaded applications?
>
> If so a hint would be nice :-) If not, is anyone interested in getting
it > working? I may be able to spend a few days on this. Some pointers
in the right direction would really help.
>
> cheers
>
> Gareth Williams
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB on Solaris 10
2008-08-06 17:07 ` Gareth Williams
@ 2008-08-07 10:39 ` Joel Brobecker
0 siblings, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2008-08-07 10:39 UTC (permalink / raw)
To: Gareth Williams; +Cc: gdb
> > CC="gcc -m64" ./configure --disable-tui
> > make
>
> And I have a 64-bit GDB that kind of works! So thanks again for the
> help.
>
> For future reference I would be interested to know if this is the right
> way to compile 64-bit on Solaris, and (unless I have missed it) perhaps
> it needs to be documented somewhere?
Yes, that's the correct way as far as I know to build GDB on sparc64.
At AdaCore, we use a compiler that is 64bit by default, so we don't
need to specify CC="gcc -m64", but otherwise we do the same.
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-08-07 10:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-05 16:58 GDB on Solaris 10 Gareth Williams
2008-08-05 19:08 ` Joel Brobecker
2008-08-06 17:07 ` Gareth Williams
2008-08-07 10:39 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox