public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Gary Thomas <gthomas@cambridge.redhat.com>
To: xavier <xavierwang@ms19.url.com.tw>
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] GDB stubs problem
Date: Tue, 29 May 2001 06:21:00 -0000	[thread overview]
Message-ID: <XFMail.20010529072150.gthomas@cambridge.redhat.com> (raw)
In-Reply-To: <002901c0e801$4184d6d0$db2314ac@rt3880>

You are definitely having trouble with the serial port not being able to
keep up with GDB (serial overrun).

The first, and indeed simplest, thing to try would be to rebuild the GDB stubs
for the board to run at 9600 baud instead of 19200.  Then try it.

On 29-May-2001 xavier wrote:
> 
> My target is a MIPS R3000 architecture, not x86, so I can't run the Linux's GDB.
> 
> I turned on the remote debug in GDB as following:
> 
> (gdb) set remotebaud 19200
> (gdb) set debug remote 1
> (gdb) target remote com1
> Remote debugging using com1
> Sending packet: $Hc-1#09...Sending packet: $Hc-1#09...Sending packet: $Hc-1#09..
> .Sending packet: $Hc-1#09...Timed out.
> Timed out.
> Timed out.
> Ignoring packet error, continuing...
> Sending packet: $qC#b4...Sending packet: $qC#b4...Sending packet: $qC#b4...Sendi
> ng packet: $qC#b4...Timed out.
> Timed out.
> Timed out.
> Ignoring packet error, continuing...
> Sending packet: $qOffsets#4b...Sending packet: $qOffsets#4b...Sending packet: $q
> Offsets#4b...Sending packet: $qOffsets#4b...Timed out.
> Timed out.
> Timed out.
> Ignoring packet error, continuing...
> Couldn't establish connection to remote target
> Malformed response to offset query, timeout
> (gdb)
> 
> Then I logged every characters came from serial port in function hal_jmr_get_char()
> in packages/hal/mips/jmr3904/v1_3_1/src/plf_stub.c. The results show that when
> the GDB tried to connect to the target, it sent the following packets:
> 
> +$H9$Hc9$Hc9$Hc9---+$4$qC4$qC4$qC4---+$b$qOb$qOb$qOb---+
> 
> But according the debug messages shown on GDB's console above, the packets are:
> 
> $Hc-1#09$Hc-1#09$Hc-1#09$Hc-1#09$qC#b4$qC#b4$qC#b4$qC#b4
> $qOffsets#4b$qOffsets#4b$qOffsets#4b$qOffsets#4b
> 
> Why aren't they equal? I guess it's the problem that causes the connection failed.
> Could someone help me?
> 
> Thanks.
> 
>> I've had the same problem.  Are you, by chance, trying to use gdb5.0
>> for x86?  If so, try the gdb that comes with your Linux distrubution.
>> I found that gdb5.0 didn't work.
>> 
>> On Mon, May 28, 2001 at 08:13:22PM +0800, xavier wrote:
>> > 
>> > Hi,
>> > 
>> > I'm trying GDB stubs support in eCos. I build both gdb_module.img and
>> > a test program with GDB stubs included. When the gdb_module.img
>> > starts in the target, it sends the following packet:
>> > 
>> > ++$T0525:a0307a34;1d:80005420;#2
>> > 
>> > It seems OK. The gdb_module is waiting for a connection. Then I connect
>> > GDB to the target. The target receives the following packet:
>> > 
>> > +$H9$Hc9$Hc9$Hc9---+$4$qC4$qC4$qC4---+$b$qOb$qOb$qOb---+
>> > 
>> > (gdb)  target remote com1
>> > Remote debugging using com1
>> > Ignoring packet error, continuing...
>> > Ignoring packet error, continuing...
>> > Ignoring packet error, continuing...
>> > Couldn't establish connection to remote target
>> > Malformed response to offset query, timeout
>> > (gdb)
>> > 
>> > I looked into the source code and found that in getpacket() in generic-stubs.c,
>> > __add_char_to_packet() expects a '#' character to finish a packet but there is
>> > no '#' character sent from GDB. So getpacket() ran forever.
>> > 
>> > Any suggestion?
>> > 
>> 

  reply	other threads:[~2001-05-29  6:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-28  5:13 xavier
2001-05-28 10:12 ` elf
2001-05-28 22:41   ` xavier
2001-05-29  6:21     ` Gary Thomas [this message]
2013-02-01  2:00 [ECOS] gdb " Bob Cagle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=XFMail.20010529072150.gthomas@cambridge.redhat.com \
    --to=gthomas@cambridge.redhat.com \
    --cc=ecos-discuss@sources.redhat.com \
    --cc=xavierwang@ms19.url.com.tw \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).