Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Peter Barada <pbarada@mail.wm.sps.mot.com>
Cc: aminayev@yahoo.com, gdb@sources.redhat.com
Subject: Re: gdb-h8-stub
Date: Thu, 18 Jul 2002 07:37:00 -0000	[thread overview]
Message-ID: <20020718143656.GA17241@nevyn.them.org> (raw)
In-Reply-To: <200207181426.g6IEQUQ17605@hyper.wm.sps.mot.com>

On Thu, Jul 18, 2002 at 10:26:30AM -0400, Peter Barada wrote:
> 
> >I'm confused. My gdb stub does not support binary downloads, but the gdb acts
> >like it does.
> >It starts downloading the program as usual:
> >(gdb) set remotedebug 1
> >(gdb) load
> >Loading section .text, size 0x160 lma 0x200000
> >Sending packet: $X200000,0:#10...Ack
> >Packet received:
> >binary downloading NOT suppported by target
> >
> >note here, the program starts at 0x200000, the gdb sends an 'X' packet with
> >that address, but receives nothing back. It concludes there, that since the
> >responce to 'X' is empty, binary download is not supported by target.
> >
> >But then, it sends a bunch of 'M' commands, which have addresses relative to
> >the 0x200000 one. But the 0x200000 was sent to target with 'X', and the 'X'
> >failed...
> 
> You're right about gdb infering that the stub doesn't support 'X' by
> the empty response packet.  An empty packet is the response the stub
> sends back to the host for any command that it doesn't understand.
> Once gdb figures out that 'X' (write binary to memory) isn't supported
> by the stub(due to the empy packet), it falls back to trying 'M'
> (write hex to memory) and finds that it works(since all stubs are
> required to support 'M').  The 'X' command is an extension so 'load'
> runs about twice as fast.

Right.  The corollary is that M and X should be using the same address. 
This works for most targets; you'll need to figure out why it doesn't
work for yours.  It may be a VMA/LMA thing...

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2002-07-18 14:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-17 23:27 gdb-h8-stub Alexei Minayev
2002-07-18  7:26 ` gdb-h8-stub Peter Barada
2002-07-18  7:37   ` Daniel Jacobowitz [this message]
2002-07-18 11:25     ` gdb-h8-stub Alexei Minayev
2002-07-18 13:05       ` gdb-h8-stub Daniel Jacobowitz
2002-07-18 23:00         ` gdb-h8-stub Alexei Minayev
2002-07-19  5:34           ` gdb-h8-stub Daniel Jacobowitz
2002-07-20 11:39             ` gdb-h8-stub Alexei Minayev
2002-07-19  7:23           ` gdb-h8-stub Peter Barada
2002-07-22  2:29 gdb-h8-stub Andrew Volkov

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=20020718143656.GA17241@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=aminayev@yahoo.com \
    --cc=gdb@sources.redhat.com \
    --cc=pbarada@mail.wm.sps.mot.com \
    /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