* Remote cross symbolic debugging on PPC...
@ 2004-07-27 14:33 sjhill
2004-07-27 15:14 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: sjhill @ 2004-07-27 14:33 UTC (permalink / raw)
To: gdb
Greetings.
I did a little searching in the ml archives, but did not find
a specific answer to my problem. I am cross debugging on a PPC
750 system. I have tried 6.1.1, 6.2 branch and head CVS versions
of GDB. I am debugging a simple hello world program that prints
out a few lines of integer numbers. My target libraries are not
compiled with debugging symbols. Bear with me, I spend all my
time in kernel space and printk is my debugger :). I am using
6.1.1 below. I cross compiled gdbserver statically.
This GDB was configured as "--host=i686-pc-linux-gnu
--target=powerpc-linux"...
(gdb) set solib-absolute-prefix /nfs/ppctarg
(gdb) target remote ppctarg:2001
Remote debugging using ppctarg:2001
0x3000f458 in ?? ()
(gdb) bt
#0 0x3000f458 in ?? ()
(gdb) c
Continuing.
Program exited normally.
(gdb) q
I assume the ?? is because no debugging symbols are present
in 'ld.so'? I was not sure, so I tried to force load 'ld.so'
at an address according to what I saw in '/proc/XXX/maps'
for the process and a readelf of 'ld.so' to see where the
.text section was at.
(gdb) set solib-absolute-prefix /nfs/ppctarg
(gdb) add-symbol-file /nfs/ppctarg/lib/ld-2.3.1.so 0x30001d00
add symbol table from file "/nfs/ppctarg/lib/ld-2.3.1.so" at
.text_addr = 0x30001d00
(y or n) y
Reading symbols from /nfs/ppctarg/lib/ld-2.3.1.so...done.
(gdb) target remote ppctarg:2001
Remote debugging using ppctarg:2001
0x3000f458 in _start ()
(gdb) bt
#0 0x3000f458 in _start ()
#1 0x00000000 in ?? ()
(gdb) c
Continuing.
Program exited normally.
(gdb) q
What is the 0x00000000 entry above? I am guessing that I should
recompile all of my target libraries with debugging symbols,
DWARF2 for PPC? I would like a sanity check please. Thanks.
-Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Remote cross symbolic debugging on PPC...
2004-07-27 14:33 Remote cross symbolic debugging on PPC sjhill
@ 2004-07-27 15:14 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2004-07-27 15:14 UTC (permalink / raw)
To: sjhill; +Cc: gdb
On Tue, Jul 27, 2004 at 09:23:30AM -0500, sjhill@realitydiluted.com wrote:
> Greetings.
>
> I did a little searching in the ml archives, but did not find
> a specific answer to my problem. I am cross debugging on a PPC
> 750 system. I have tried 6.1.1, 6.2 branch and head CVS versions
> of GDB. I am debugging a simple hello world program that prints
> out a few lines of integer numbers. My target libraries are not
> compiled with debugging symbols. Bear with me, I spend all my
> time in kernel space and printk is my debugger :). I am using
> 6.1.1 below. I cross compiled gdbserver statically.
>
> This GDB was configured as "--host=i686-pc-linux-gnu
> --target=powerpc-linux"...
> (gdb) set solib-absolute-prefix /nfs/ppctarg
> (gdb) target remote ppctarg:2001
> Remote debugging using ppctarg:2001
> 0x3000f458 in ?? ()
> (gdb) bt
> #0 0x3000f458 in ?? ()
> (gdb) c
> Continuing.
>
> Program exited normally.
> (gdb) q
>
> I assume the ?? is because no debugging symbols are present
> in 'ld.so'? I was not sure, so I tried to force load 'ld.so'
> at an address according to what I saw in '/proc/XXX/maps'
> for the process and a readelf of 'ld.so' to see where the
> .text section was at.
Generally, before the program begins execution GDB does not have
information on where ld.so is loaded, so it can't get symbols. It will
get them automatically further in (after the solib event breakpoint).
> (gdb) set solib-absolute-prefix /nfs/ppctarg
> (gdb) add-symbol-file /nfs/ppctarg/lib/ld-2.3.1.so 0x30001d00
> add symbol table from file "/nfs/ppctarg/lib/ld-2.3.1.so" at
> .text_addr = 0x30001d00
> (y or n) y
> Reading symbols from /nfs/ppctarg/lib/ld-2.3.1.so...done.
> (gdb) target remote ppctarg:2001
> Remote debugging using ppctarg:2001
> 0x3000f458 in _start ()
> (gdb) bt
> #0 0x3000f458 in _start ()
> #1 0x00000000 in ?? ()
> (gdb) c
> Continuing.
>
> Program exited normally.
> (gdb) q
>
> What is the 0x00000000 entry above? I am guessing that I should
It means that GDB doesn't know that _start is at the outside of the
frame chain (has no caller). It's not a problem.
--
Daniel Jacobowitz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-07-27 14:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-27 14:33 Remote cross symbolic debugging on PPC sjhill
2004-07-27 15:14 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox