This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb hangs on diag_printf()


On Tue, Mar 23, 2004 at 01:19:40PM +1100, Tony Butt wrote:
> Hi,
> We have been running ECos 1.3.1.3 here for some time, and are in the 
> process of upgrading to 2.0
> 
> I am using the EcosCentric toolset (thanks guys!), and have hit a 
> problem when using  gdb to load and run applications.
> 
> What happens is that after the first diag_printf(), everything stops. 
> The output from the diag_printf is seen, then nothing.
> 
> A sample output is attached here ( from the 'cache' test program 
> supplied with ecos)
> 
> ===============================
> $ powerpc-eabi-gdb -n -b 38400 cache
> GNU gdb 5.3 (eCosCentric)
> Copyright 2002 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain 
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "--host=i686-pc-cygwin --target=powerpc-eabi"...
> (gdb) target remote com1
> Remote debugging using com1
> 0x2000ec74 in ?? ()
> (gdb) load
> Loading section .text, size 0x48a08 lma 0x20000
> Loading section .rodata, size 0x4f70 lma 0x68a08
> Loading section .data, size 0x20c4 lma 0x6d978
> Start address 0x20000, load size 326204
> Transfer rate: 27183 bits/sec, 510 bytes/write.
> (gdb) set debug remote 1
> (gdb) c
> Continuing.
> Sending packet: $Z0,20010,4#09...Ack
> Packet received:
> Packet Z0 (software-breakpoint) is NOT supported
> Sending packet: $m20010,4#c0...Ack
> Packet received: 3c600000
> Sending packet: $X20010,4:}]\202\020\b#59...Ack
> Packet received: OK
> Sending packet: $Hc0#db...Ack
> Packet received: OK
> Sending packet: $c#63...Ack
> Packet received: T0540:00020010;01:03fbcfc0;
> Sending packet: $X20010,4:<`\000\000#81...Ack
> Packet received: OK
> Sending packet: $Hc0#db...Ack
> Packet received: OK
> Sending packet: $s#73...Ack
> Packet received: T0540:00020014;01:03fbcfc0;
> Sending packet: $m20010,4#c0...Ack
> Packet received: 3c600000
> Sending packet: $X20010,4:}]\202\020\b#59...Ack
> Packet received: OK
> Sending packet: $Hc0#db...Ack
> Packet received: OK
> Sending packet: $c#63...Ack
> Packet received: O494E464F3A3C446361636865206F666620496361636865206F66663E0A
> INFO:<Dcache off Icache off>
> 
> then nothing...
> =====================================

It looks like the handshake is not working properly. At this point
disconnect gdb, start up kermit or some other terminal emulator and
send a + character. See if that brings it back to life.

I've no idea why this is happening thought. You somehow need to work
out which end is not working. Is gdb not sending the + or is the
target not receiving the +. Do you have any way to snoop the traffic
on the serial cable?

   Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]