Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfa] NEWS additions for flash
@ 2006-09-21 14:18 Daniel Jacobowitz
  2006-09-21 19:11 ` Michael Snyder
  2006-09-22 12:06 ` [rfa] NEWS additions for flash Eli Zaretskii
  0 siblings, 2 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2006-09-21 14:18 UTC (permalink / raw)
  To: gdb-patches

This patch adds news entries for the flash patches I've just checked
in.  Is this OK?

The next release is shaping up to be quite an improvement.

-- 
Daniel Jacobowitz
CodeSourcery

2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>

	* NEWS: Mention flash support for "load" and new remote packets.

Index: gdb/NEWS
===================================================================
RCS file: /cvs/src/src/gdb/NEWS,v
retrieving revision 1.197
diff -u -p -r1.197 NEWS
--- gdb/NEWS	16 Aug 2006 20:33:23 -0000	1.197
+++ gdb/NEWS	21 Sep 2006 14:16:05 -0000
@@ -14,6 +14,9 @@ supported.
 * The "set trust-readonly-sections" command works again.  This command was
 broken in GDB 6.3, 6.4, and 6.5.
 
+* The "load" command now supports writing to flash memory, when the remote
+stub provides the required support.
+
 * New commands
 
 set substitute-path
@@ -52,6 +55,15 @@ qXfer:auxv:read:
   Fetch an OS auxilliary vector from the remote stub.  This packet is a
   more efficient replacement for qPart:auxv:read.
 
+qXfer:memory-map:read:
+  Fetch a memory map from the remote stub, including information about
+  RAM, ROM, and flash memory devices.
+
+vFlashErase:
+vFlashWrite:
+vFlashDone:
+  Erase and program a flash memory device.
+
 * Removed remote packets
 
 qPart:auxv:read:


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [rfa] NEWS additions for flash
  2006-09-21 14:18 [rfa] NEWS additions for flash Daniel Jacobowitz
@ 2006-09-21 19:11 ` Michael Snyder
  2006-09-21 19:14   ` Daniel Jacobowitz
  2006-09-22 12:06 ` [rfa] NEWS additions for flash Eli Zaretskii
  1 sibling, 1 reply; 8+ messages in thread
From: Michael Snyder @ 2006-09-21 19:11 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

On Thu, 2006-09-21 at 10:18 -0400, Daniel Jacobowitz wrote:
> This patch adds news entries for the flash patches I've just checked
> in.  Is this OK?
> 
> The next release is shaping up to be quite an improvement.

On a quick scan of your (today's) patch, I don't see any tests.
Is this testable?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [rfa] NEWS additions for flash
  2006-09-21 19:11 ` Michael Snyder
@ 2006-09-21 19:14   ` Daniel Jacobowitz
  2006-09-21 21:00     ` Michael Snyder
  2006-09-22  6:22     ` Testing flash (Was: [rfa] NEWS additions for flash) Vladimir Prus
  0 siblings, 2 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2006-09-21 19:14 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

On Thu, Sep 21, 2006 at 12:10:56PM -0700, Michael Snyder wrote:
> On Thu, 2006-09-21 at 10:18 -0400, Daniel Jacobowitz wrote:
> > This patch adds news entries for the flash patches I've just checked
> > in.  Is this OK?
> > 
> > The next release is shaping up to be quite an improvement.
> 
> On a quick scan of your (today's) patch, I don't see any tests.
> Is this testable?

In theory, you could write some tests for it using 'gdbreplay'.  But
getting gdbreplay to work in the testsuite harness would be quite
tricky, and it would be complicated by the fact that which registers
GDB asks for at connection is target dependent; I don't know how to
write generic remote protocol tests.

I'd love to unit test this stuff.  If you have any suggestions, I'm
all ears.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [rfa] NEWS additions for flash
  2006-09-21 19:14   ` Daniel Jacobowitz
@ 2006-09-21 21:00     ` Michael Snyder
  2006-09-22  6:22     ` Testing flash (Was: [rfa] NEWS additions for flash) Vladimir Prus
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Snyder @ 2006-09-21 21:00 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

On Thu, 2006-09-21 at 15:14 -0400, Daniel Jacobowitz wrote:
> On Thu, Sep 21, 2006 at 12:10:56PM -0700, Michael Snyder wrote:
> > On Thu, 2006-09-21 at 10:18 -0400, Daniel Jacobowitz wrote:
> > > This patch adds news entries for the flash patches I've just checked
> > > in.  Is this OK?
> > > 
> > > The next release is shaping up to be quite an improvement.
> > 
> > On a quick scan of your (today's) patch, I don't see any tests.
> > Is this testable?
> 
> In theory, you could write some tests for it using 'gdbreplay'.  But
> getting gdbreplay to work in the testsuite harness would be quite
> tricky, and it would be complicated by the fact that which registers
> GDB asks for at connection is target dependent; I don't know how to
> write generic remote protocol tests.
> 
> I'd love to unit test this stuff.  If you have any suggestions, I'm
> all ears.

Let's see -- there's asm-source.exp, which is implemented on an 
arch-by-arch basis.  There's gdb.base/regs.exp, which was intended
to be done the same way (but apparently was only ever implemented
for one architecture).  There's gdb.arch...

Those are just examples -- I know it would be a hassle.
I think asm-source is a very useful test, and I wish there
were others (such as regs.exp) that were done in a similar
arch-by-arch way.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Testing flash (Was: [rfa] NEWS additions for flash)
  2006-09-21 19:14   ` Daniel Jacobowitz
  2006-09-21 21:00     ` Michael Snyder
@ 2006-09-22  6:22     ` Vladimir Prus
  2006-09-22 17:55       ` Michael Snyder
  1 sibling, 1 reply; 8+ messages in thread
From: Vladimir Prus @ 2006-09-22  6:22 UTC (permalink / raw)
  To: gdb-patches

Daniel Jacobowitz wrote:

> On Thu, Sep 21, 2006 at 12:10:56PM -0700, Michael Snyder wrote:
>> On Thu, 2006-09-21 at 10:18 -0400, Daniel Jacobowitz wrote:
>> > This patch adds news entries for the flash patches I've just checked
>> > in.  Is this OK?
>> > 
>> > The next release is shaping up to be quite an improvement.
>> 
>> On a quick scan of your (today's) patch, I don't see any tests.
>> Is this testable?
> 
> In theory, you could write some tests for it using 'gdbreplay'.  But
> getting gdbreplay to work in the testsuite harness would be quite
> tricky, and it would be complicated by the fact that which registers
> GDB asks for at connection is target dependent; I don't know how to
> write generic remote protocol tests.
> 
> I'd love to unit test this stuff.  If you have any suggestions, I'm
> all ears.

Assuming not everybody has boards with flash handy, and burning flash every
night is bad idea, we need some 'fake' setup anyway. For example, we can
take any remote test and then:

  - Fabricate memory map that has flash regions. Such memory map can
    be fixed, having no relation to actual remote target. 
  - Log all flash packets without passing them to remote side.

I think we can either have special 'flash debug mode' in gdb, which reads
memory map from a file you specify and writes flash packages to another
file you specify, or man-in-the-middle between gdb and real remote that
does the same. I'd suspect adding flash debug mode in gdb would be simpler.

Ah, and I supposed that if we want to match generated flash packets to
expectation, we need to 'load' a fixed *binary* -- not binary produced from
sources, but a binary added to CVS.

- Volodya



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [rfa] NEWS additions for flash
  2006-09-21 14:18 [rfa] NEWS additions for flash Daniel Jacobowitz
  2006-09-21 19:11 ` Michael Snyder
@ 2006-09-22 12:06 ` Eli Zaretskii
  2007-01-21 17:49   ` Daniel Jacobowitz
  1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2006-09-22 12:06 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

> Date: Thu, 21 Sep 2006 10:18:03 -0400
> From: Daniel Jacobowitz <drow@false.org>
> 
> This patch adds news entries for the flash patches I've just checked
> in.  Is this OK?

Yes, with a single comment:

> +* The "load" command now supports writing to flash memory, when the remote
> +stub provides the required support.

I think ``if the remote stub provides the required support'' is better
(``when'' has a time-related meaning, which is not what you want to
say here).

Thanks.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Testing flash (Was: [rfa] NEWS additions for flash)
  2006-09-22  6:22     ` Testing flash (Was: [rfa] NEWS additions for flash) Vladimir Prus
@ 2006-09-22 17:55       ` Michael Snyder
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Snyder @ 2006-09-22 17:55 UTC (permalink / raw)
  To: Vladimir Prus; +Cc: gdb-patches

On Fri, 2006-09-22 at 10:23 +0400, Vladimir Prus wrote:
> Daniel Jacobowitz wrote:
> 
> > On Thu, Sep 21, 2006 at 12:10:56PM -0700, Michael Snyder wrote:
> >> On Thu, 2006-09-21 at 10:18 -0400, Daniel Jacobowitz wrote:
> >> > This patch adds news entries for the flash patches I've just checked
> >> > in.  Is this OK?
> >> > 
> >> > The next release is shaping up to be quite an improvement.
> >> 
> >> On a quick scan of your (today's) patch, I don't see any tests.
> >> Is this testable?
> > 
> > In theory, you could write some tests for it using 'gdbreplay'.  But
> > getting gdbreplay to work in the testsuite harness would be quite
> > tricky, and it would be complicated by the fact that which registers
> > GDB asks for at connection is target dependent; I don't know how to
> > write generic remote protocol tests.
> > 
> > I'd love to unit test this stuff.  If you have any suggestions, I'm
> > all ears.
> 
> Assuming not everybody has boards with flash handy, and burning flash every
> night is bad idea, we need some 'fake' setup anyway. For example, we can
> take any remote test and then:
> 
>   - Fabricate memory map that has flash regions. Such memory map can
>     be fixed, having no relation to actual remote target. 
>   - Log all flash packets without passing them to remote side.
> 
> I think we can either have special 'flash debug mode' in gdb, which reads
> memory map from a file you specify and writes flash packages to another
> file you specify, or man-in-the-middle between gdb and real remote that
> does the same. I'd suspect adding flash debug mode in gdb would be simpler.
> 
> Ah, and I supposed that if we want to match generated flash packets to
> expectation, we need to 'load' a fixed *binary* -- not binary produced from
> sources, but a binary added to CVS.

I'm very interested in general in this kind of "fake" debugging, 
essentially for testing purposes.  E.g. that we could make up a
hacked version of gdbserver that would give back some packet
responses that immitated services that it was not actually able
to provide.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [rfa] NEWS additions for flash
  2006-09-22 12:06 ` [rfa] NEWS additions for flash Eli Zaretskii
@ 2007-01-21 17:49   ` Daniel Jacobowitz
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2007-01-21 17:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb-patches

On Fri, Sep 22, 2006 at 03:05:34PM +0300, Eli Zaretskii wrote:
> > Date: Thu, 21 Sep 2006 10:18:03 -0400
> > From: Daniel Jacobowitz <drow@false.org>
> > 
> > This patch adds news entries for the flash patches I've just checked
> > in.  Is this OK?
> 
> Yes, with a single comment:
> 
> > +* The "load" command now supports writing to flash memory, when the remote
> > +stub provides the required support.
> 
> I think ``if the remote stub provides the required support'' is better
> (``when'' has a time-related meaning, which is not what you want to
> say here).

Thank you.  I've committed it... pie on my face, I forgot about it for
months, and missed the release of GDB 6.6.  But at least it will be
there in the history of the next release.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-01-21 17:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-21 14:18 [rfa] NEWS additions for flash Daniel Jacobowitz
2006-09-21 19:11 ` Michael Snyder
2006-09-21 19:14   ` Daniel Jacobowitz
2006-09-21 21:00     ` Michael Snyder
2006-09-22  6:22     ` Testing flash (Was: [rfa] NEWS additions for flash) Vladimir Prus
2006-09-22 17:55       ` Michael Snyder
2006-09-22 12:06 ` [rfa] NEWS additions for flash Eli Zaretskii
2007-01-21 17:49   ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox