* Remote debug on ppc405
@ 2004-01-06 13:50 Robert Schwebel
2004-01-06 21:59 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Robert Schwebel @ 2004-01-06 13:50 UTC (permalink / raw)
To: gdb
Hi,
I currently try to remote-gdb a program which runs on a ppc405gpr board
and I cannot start it:
----------8<----------8<----------8<----------8<----------8<----------
(gdb) target remote 192.168.1.16:4711
Sending packet: $Hc-1#09...Ack
Packet received: OK
Sending packet: $qC#b4...Ack
Packet received:
Sending packet: $qOffsets#4b...Ack
Packet received:
Sending packet: $?#3f...Ack
Packet received: T0501:7ffffe90;40:3000fba8;
Sending packet: $Hg0#df...Ack
Packet received: OK
Sending packet: $g#67...Ack
Packet received: 000000007ffffe90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000fba80000d0320000000000000000000000000000000000000000
Sending packet: $mfffffffc,c#29...Ack
Packet received: ffffffffffffffffffffffff
0x3000fba8 in ?? ()
Sending packet: $m10010920,c8#c1...Ack
Packet received: 00000001000000100000000c100003280000000d100008980000000410000150000000051000022c000000061000018c0000000a000000680000000b0000001000000015000000000000000310010a100000000200000054000000140000000700000017100002d400000007100002c80000000800000060000000090000000c6ffffffe100002a86fffffff000000016ffffff010000294000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Sending packet: $qSymbol::#5b...Ack
Packet received: qSymbol:5f5f707468726561645f746872656164735f6576656e7473
Packet qSymbol (symbol-lookup) is supported
Sending packet: $qSymbol::5f5f707468726561645f746872656164735f6576656e7473#47...Ack
Packet received: OK
(gdb) si
Sending packet: $Z0,3001b628,4#dc...Ack
Packet received:
Packet Z0 (software-breakpoint) is NOT supported
Sending packet: $m3001b628,4#93...Ack
Packet received: ffffffff
Sending packet: $X3001b628,0:#b4...Ack
Packet received:
binary downloading NOT suppported by target
Sending packet: $M3001b628,4:7d821008#7b...Ack
Packet received: ENN
Sending packet: $M3001b628,4:7d821008#7b...Ack
Packet received: ENN
Warning:
Cannot insert breakpoint -1.
Error accessing memory address 0x3001b628: Input/output error.
(gdb)
----------8<----------8<----------8<----------8<----------8<----------
Looks to me like the PC address (0x3001b628) is not determined correctly;
readelf shows that .text starts at 0x10000350:
----------8<----------8<----------8<----------8<----------8<----------
robert@himalia:~/local/cvs/efco/map-test> powerpc-linux-readelf -S map-test
There are 37 section headers, starting at offset 0x3654:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .interp PROGBITS 10000114 000114 000013 00 A 0 0 1
[ 2] .note.ABI-tag NOTE 10000130 000130 000020 00 A 0 0 16
[ 3] .hash HASH 10000150 000150 00003c 04 A 4 0 4
[ 4] .dynsym DYNSYM 1000018c 00018c 0000a0 10 A 5 1 4
[ 5] .dynstr STRTAB 1000022c 00022c 000068 00 A 0 0 1
[ 6] .gnu.version VERSYM 10000294 000294 000014 02 A 4 0 2
[ 7] .gnu.version_r VERNEED 100002a8 0002a8 000020 00 A 5 1 4
[ 8] .rela.dyn RELA 100002c8 0002c8 00000c 0c A 4 0 4
[ 9] .rela.plt RELA 100002d4 0002d4 000054 0c A 4 18 4
[10] .init PROGBITS 10000328 000328 000028 00 AX 0 0 4
[11] .text PROGBITS 10000350 000350 000548 00 AX 0 0 4
[12] .fini PROGBITS 10000898 000898 000020 00 AX 0 0 4
[13] .rodata PROGBITS 100008b8 0008b8 00005c 00 A 0 0 4
[14] .sdata2 PROGBITS 10000914 000914 000000 00 A 0 0 4
[15] .data PROGBITS 10010914 000914 000008 00 WA 0 0 4
[16] .eh_frame PROGBITS 1001091c 00091c 000004 00 WA 0 0 4
[17] .dynamic DYNAMIC 10010920 000920 0000c8 08 WA 5 0 4
[18] .ctors PROGBITS 100109e8 0009e8 000008 00 WA 0 0 4
[19] .dtors PROGBITS 100109f0 0009f0 000008 00 WA 0 0 4
[20] .jcr PROGBITS 100109f8 0009f8 000004 00 WA 0 0 4
[21] .got PROGBITS 100109fc 0009fc 000014 04 WAX 0 0 4
[22] .sdata PROGBITS 10010a10 000a10 000000 00 WA 0 0 4
[23] .sbss NOBITS 10010a10 000a10 000000 00 WA 0 0 1
[24] .plt NOBITS 10010a10 000a10 00009c 00 WAX 0 0 4
[25] .bss NOBITS 10010aac 000a10 000004 00 WA 0 0 1
[26] .comment PROGBITS 00000000 000a10 00006c 00 0 0 1
[27] .debug_aranges PROGBITS 00000000 000a80 000078 00 0 0 8
[28] .debug_pubnames PROGBITS 00000000 000af8 00001b 00 0 0 1
[29] .debug_info PROGBITS 00000000 000b13 0014b3 00 0 0 1
[30] .debug_abbrev PROGBITS 00000000 001fc6 0001bb 00 0 0 1
[31] .debug_line PROGBITS 00000000 002181 00072f 00 0 0 1
[32] .debug_frame PROGBITS 00000000 0028b0 00002c 00 0 0 4
[33] .debug_str PROGBITS 00000000 0028dc 000c35 01 MS 0 0 1
[34] .shstrtab STRTAB 00000000 003511 000142 00 0 0 1
[35] .symtab SYMTAB 00000000 003c1c 000e60 10 36 63 4
[36] .strtab STRTAB 00000000 004a7c 000a05 00 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), G (group), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)
----------8<----------8<----------8<----------8<----------8<----------
Any idea?
Robert
--
Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
HornemannstraÃe 12, 31137 Hildesheim, Germany
Phone: +49-5121-28619-0 | Fax: +49-5121-28619-4
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Remote debug on ppc405
2004-01-06 13:50 Remote debug on ppc405 Robert Schwebel
@ 2004-01-06 21:59 ` Daniel Jacobowitz
2004-01-07 8:30 ` Robert Schwebel
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2004-01-06 21:59 UTC (permalink / raw)
To: Robert Schwebel; +Cc: gdb
On Tue, Jan 06, 2004 at 02:50:48PM +0100, Robert Schwebel wrote:
> Hi,
>
> I currently try to remote-gdb a program which runs on a ppc405gpr board
> and I cannot start it:
>
> ----------8<----------8<----------8<----------8<----------8<----------
> (gdb) target remote 192.168.1.16:4711
> Sending packet: $Hc-1#09...Ack
> Packet received: OK
> Sending packet: $qC#b4...Ack
> Packet received:
> Sending packet: $qOffsets#4b...Ack
> Packet received:
> Sending packet: $?#3f...Ack
> Packet received: T0501:7ffffe90;40:3000fba8;
> Sending packet: $Hg0#df...Ack
> Packet received: OK
> Sending packet: $g#67...Ack
> Packet received: 000000007ffffe90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000fba80000d0320000000000000000000000000000000000000000
> Sending packet: $mfffffffc,c#29...Ack
> Packet received: ffffffffffffffffffffffff
> 0x3000fba8 in ?? ()
GDB's just printing the PC found in your G packet. If it's wrong, talk
to whoever wrote your debugging stub. The T package above agrees with
this value of PC.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Remote debug on ppc405
2004-01-06 21:59 ` Daniel Jacobowitz
@ 2004-01-07 8:30 ` Robert Schwebel
2004-01-07 9:54 ` Robert Schwebel
0 siblings, 1 reply; 4+ messages in thread
From: Robert Schwebel @ 2004-01-07 8:30 UTC (permalink / raw)
To: gdb
Daniel,
On Tue, Jan 06, 2004 at 04:59:04PM -0500, Daniel Jacobowitz wrote:
> GDB's just printing the PC found in your G packet. If it's wrong,
> talk to whoever wrote your debugging stub. The T package above agrees
> with this value of PC.
Hmm, it's the default powerpc stub from vanilla-gdb-6.0. Is my
interpretation of the readelf output correct that I should assume a
0x1000something value?
Robert
--
Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
HornemannstraÃe 12, 31137 Hildesheim, Germany
Phone: +49-5121-28619-0 | Fax: +49-5121-28619-4
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Remote debug on ppc405
2004-01-07 8:30 ` Robert Schwebel
@ 2004-01-07 9:54 ` Robert Schwebel
0 siblings, 0 replies; 4+ messages in thread
From: Robert Schwebel @ 2004-01-07 9:54 UTC (permalink / raw)
To: gdb
On Wed, Jan 07, 2004 at 09:29:59AM +0100, Robert Schwebel wrote:
> Hmm, it's the default powerpc stub from vanilla-gdb-6.0. Is my
> interpretation of the readelf output correct that I should assume a
> 0x1000something value?
In the meantime I found out that when linking the file-under-test
statically it works, so it seems to have to do something with dynamic
loading. I found this post:
http://sources.redhat.com/ml/gdb/2002-07/msg00155.html
on the gdb list, but setting solib-search-path alone does not seem to
help.
It looks to me that starting from 0x3000'0000 the shared libraries are
mapped in, which looks perfectly fine. But why on earth does gdb try to
insert the breakpoint there?
Robert
--
Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
HornemannstraÃe 12, 31137 Hildesheim, Germany
Phone: +49-5121-28619-0 | Fax: +49-5121-28619-4
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-01-07 9:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-06 13:50 Remote debug on ppc405 Robert Schwebel
2004-01-06 21:59 ` Daniel Jacobowitz
2004-01-07 8:30 ` Robert Schwebel
2004-01-07 9:54 ` Robert Schwebel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox