* gdb-h8-stub... please help.
@ 2002-07-13 22:58 Alexei Minayev
2002-07-15 7:20 ` Peter Barada
0 siblings, 1 reply; 4+ messages in thread
From: Alexei Minayev @ 2002-07-13 22:58 UTC (permalink / raw)
To: gdb
Dear GDB gurus,
I'm new to this list, and I'd appreciate your expertise.
I'm developing a gdb-stub for a Hitachi platform. I'm done with the hardware
part, but my stub and the gdb have problem understanding each other.
I compile my test program and fire up the gdb...
(gdb) set remotedebug 1
(gdb) load
...
Start address 0x200144 , load size 352
Sending packet: $P9=00200144#51...Ack
Packet received: OK
Transfer rate: 2816 bits in <1 sec.
(gdb) b main
Sending packet: $m0,2#fb...Ack
Packet received: 0000
Sending packet: $m0,2#fb...Ack
Packet received: 0000
Breakpoint 1 at 0x200018: file hello.c, line 10.
<Looks OK so far, but then>
(gdb) step
Cannot find bounds of current function
<very confusing, and then some>
(gdb) cont
Continuing.
Sending packet: $m18,2#34...Ack
Packet received: 0000
binary downloading NOT suppported by target
Sending packet: $M18,2:5730#1d...Ack
Packet received: OK
Sending packet: $Hc0#db...Ack
Packet received:
Sending packet: $c#63...putpkt: Junk: @
Timed out.
Packet received: S05
Sending packet: $c#63...putpkt: Junk:
Timed out.
end quote.
I would appreciate any light that you can shine on this. Do I need to patch
GDB? Do I need to process binary downloading (I don't do it now)? Add extra
cases to my command switch?
Thanks a lot!
Regards -- Alexei
__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdb-h8-stub... please help.
2002-07-13 22:58 gdb-h8-stub... please help Alexei Minayev
@ 2002-07-15 7:20 ` Peter Barada
2002-07-15 7:35 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Peter Barada @ 2002-07-15 7:20 UTC (permalink / raw)
To: aminayev; +Cc: gdb
>(gdb) cont
>Continuing.
>Sending packet: $m18,2#34...Ack
>Packet received: 0000
>binary downloading NOT suppported by target
>Sending packet: $M18,2:5730#1d...Ack
>Packet received: OK
>Sending packet: $Hc0#db...Ack
>Packet received:
>Sending packet: $c#63...putpkt: Junk: @
>Timed out.
>Packet received: S05
>Sending packet: $c#63...putpkt: Junk:
>Timed out.
>
>end quote.
>I would appreciate any light that you can shine on this. Do I need to patch
>GDB? Do I need to process binary downloading (I don't do it now)? Add extra
>cases to my command switch?
>
GDB tried the binary download('m'), and when that failed, fell back to
hex download('M'). So you don't need to add binary download.
To me it looks like the problem is in the stub since the communication
between the host and stub is not working correctly. If you have a
spare serial port on the target, add code to the stub to dump each
packet that is recieved and sent. Run through the sequence again, and
then decode the packets in the debug output and compare it against the
documentation. I'm sure you'll eventually find what's wrong in your
stub...
--
Peter Barada Peter.Barada@motorola.com
Wizard 781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola) 781-270-0193 (fax)
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: gdb-h8-stub... please help.
2002-07-15 7:20 ` Peter Barada
@ 2002-07-15 7:35 ` Daniel Jacobowitz
2002-07-15 9:26 ` Andrew Cagney
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-07-15 7:35 UTC (permalink / raw)
To: Peter Barada; +Cc: aminayev, gdb
On Mon, Jul 15, 2002 at 10:20:29AM -0400, Peter Barada wrote:
>
> >(gdb) cont
> >Continuing.
> >Sending packet: $m18,2#34...Ack
> >Packet received: 0000
> >binary downloading NOT suppported by target
> >Sending packet: $M18,2:5730#1d...Ack
> >Packet received: OK
> >Sending packet: $Hc0#db...Ack
> >Packet received:
> >Sending packet: $c#63...putpkt: Junk: @
> >Timed out.
> >Packet received: S05
> >Sending packet: $c#63...putpkt: Junk:
> >Timed out.
> >
> >end quote.
> >I would appreciate any light that you can shine on this. Do I need to patch
> >GDB? Do I need to process binary downloading (I don't do it now)? Add extra
> >cases to my command switch?
> >
>
> GDB tried the binary download('m'), and when that failed, fell back to
> hex download('M'). So you don't need to add binary download.
For the record, 'm' is memory read, not binary download. It looks like
binary download was already marked unsupported, or something like that.
> To me it looks like the problem is in the stub since the communication
> between the host and stub is not working correctly. If you have a
> spare serial port on the target, add code to the stub to dump each
> packet that is recieved and sent. Run through the sequence again, and
> then decode the packets in the debug output and compare it against the
> documentation. I'm sure you'll eventually find what's wrong in your
> stub...
At a guess, "Junk: @". The stub is sending something out the serial
port, or the application is being allowed to write to the serial port
while GDB is waiting for a result.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: gdb-h8-stub... please help.
2002-07-15 7:35 ` Daniel Jacobowitz
@ 2002-07-15 9:26 ` Andrew Cagney
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2002-07-15 9:26 UTC (permalink / raw)
To: Peter Barada; +Cc: Daniel Jacobowitz, aminayev, gdb
> At a guess, "Junk: @". The stub is sending something out the serial
> port, or the application is being allowed to write to the serial port
> while GDB is waiting for a result.
Using ``(gdb) set debug serial 1'' before the target command might help.
That will let you see exactly what GDB is reading / writing.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-07-15 16:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-13 22:58 gdb-h8-stub... please help Alexei Minayev
2002-07-15 7:20 ` Peter Barada
2002-07-15 7:35 ` Daniel Jacobowitz
2002-07-15 9:26 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox