Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: gdb@sourceware.org
Subject: Re: GDB support for flash: implementation
Date: Mon, 05 Jun 2006 21:02:00 -0000	[thread overview]
Message-ID: <20060605210238.GA1036@nevyn.them.org> (raw)
In-Reply-To: <vt2y7wbe9jv.fsf@theseus.home.>

On Mon, Jun 05, 2006 at 11:34:12AM -0700, Jim Blandy wrote:
> The GDB load command initially tries to place the program image in
> memory using ordinary memory write requests --- remote protocol M or X
> requests. However, when the stub detects that GDB has attempted to
> write to flash memory, it returns an error code of the form:
> 
>         Eflash:addr;length
> 
> In this reply, addr and length are the start address and length of the
> block of flash memory the write request attempted to modify. That is,
> a write that overlaps any portion of a region of flash memory elicits
> an Eflash response giving the location and size of the entire flash
> memory. If the write request overlaps two areas of flash, the Eflash
> request reports the lowest-addressed area. When the stub returns an
> Eflash result, it should discard the entire write request; if portions
> of the request cover non-flash memory, the contents of that memory
> should be unchanged.

Jim and I were talking about this earlier and didn't really come to a
conclusion.  I don't like Eflash; I think it's unnecessarily
complicated, and that it would actually be simpler to ask the target
to tell us where its flash is.

So, my counter-proposal is:

- Merge the bits of XML support that I've already done on a branch,
but only those bits related to receiving and parsing target
descriptions.  Most of what I've got there is actually related to
changing the gdbarch based on the results, e.g. adding new registers.
That's a separate problem from this one, but I can separate out the
transport layer bits easily enough.

- Send a qXfer:features packet to the target, and get its response.
The response will include descriptions of each flash device on the
target.  How verbose we want those to be is up in the air; I think that
given Jim's proposal, the only things we would outright need are
base address and size.  We might want to define other common
attributes, such as block size and width, so that we can...

- ...implement "info flash" based on the results.

- Generate flash write packets when a write would cover flash.


-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-06-05 21:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-05 18:34 Jim Blandy
2006-06-05 21:02 ` Daniel Jacobowitz [this message]
2006-06-05 21:28   ` Jim Blandy
2006-06-05 22:39     ` Daniel Jacobowitz
2006-06-06  0:59   ` Daniel Jacobowitz
2006-06-06  2:03     ` Steven Johnson
2006-06-06  3:19       ` Daniel Jacobowitz
2006-06-06  6:16         ` Jim Blandy

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=20060605210238.GA1036@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sourceware.org \
    /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