From: Jim Blandy <jimb@codesourcery.com>
To: Steven Johnson <sjohnson@sakuraindustries.com>
Cc: gdb@sourceware.org
Subject: Re: GDB support for flash: implementation
Date: Tue, 06 Jun 2006 06:16:00 -0000 [thread overview]
Message-ID: <vt27j3uzu46.fsf@theseus.home.> (raw)
In-Reply-To: <20060606031912.GA10922@nevyn.them.org> (Daniel Jacobowitz's message of "Mon, 5 Jun 2006 23:19:12 -0400")
Daniel Jacobowitz <drow@false.org> writes:
> On Tue, Jun 06, 2006 at 01:03:23PM +1100, Steven Johnson wrote:
>> A problem I see with this, is targets where the memory map changes on
>> the fly, for example, my ARM target starts with Flash mapped at address
>> 0x0, for 512K (for booting). Some time later, flash is remapped to
>> another address, say 0x40000000 for 512K and some SRAM is mapped down to
>> 0x0 for 16K. If GDB thought Flash was still at 0x0 after this it would
>> be wrong, and "The target HAS come along and surprised us later". There
>> would need to be some mechanism for the stub to say "Things changed,
>> reinitialise". How a stub would detect this or tell GDB about it, is
>> another issue, but at least GDB needs to be able to re-sync when a
>> target changes its memory arrangement in any significant way.
>>
>> This is one reason why i preferred a "map" style command, so that if
>> things like this changed, the person doing the debug could force the
>> necessary changes onto GDB's understanding of the target, if required.
>> I don't mind the "automatic" retrieval of info from a stub, but it
>> should be able to be over-ridden if required.
>
> Good point. I'm going to have to think about this. I don't really
> want to give up on the idea, but it may need a little work.
>
> Jim, this may be a persuasive argument in favor of separating the
> memory map from the features, as you were talking about earlier.
> I still don't like the idea, but my current mental model isn't wired
> for virtual memory.
Wow. I hadn't thought about that at all.
It seems like the stub should be able to check the affected memory
type before it does each write. And if the stub can produce errors
reliably in response to attempts to write the wrong sort of memory (X
and M to flash, vFlashWrite to non-flash), then GDB would know it
needed to refresh its map.
Certainly if we've got a map, there need to be user mechanisms for
viewing it and correcting it.
prev parent reply other threads:[~2006-06-06 6:16 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
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 [this message]
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=vt27j3uzu46.fsf@theseus.home. \
--to=jimb@codesourcery.com \
--cc=gdb@sourceware.org \
--cc=sjohnson@sakuraindustries.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