public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Writing to Memory and Page Alignment
@ 2003-08-07 10:36 David Mc Kenna
  2003-08-07 12:06 ` Duane Ellis
  2003-08-07 13:53 ` Daniel Jacobowitz
  0 siblings, 2 replies; 4+ messages in thread
From: David Mc Kenna @ 2003-08-07 10:36 UTC (permalink / raw)
  To: gdb, insight

Hi all,

Is it possible to force gdb to write data to a target in a page aligned ( boundary
) manner?

For example, I have flash memory which is located at 0x8000 and the page size
is 256bytes. Under the current setup, gdb can overlap the pages and cause problems,
e.g. $MF0,40:.......#CS, here pages 0 and 1 overlap. Is it possible to get gdb
to split this command into two page aligned commands? i.e. $MF0,10:...#CS, page
0 written, and $M100,30:...#CS, page 1 written.

Thanks,
Dave Mc Kenna


--
http://www.iol.ie

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

* Re: Writing to Memory and Page Alignment
  2003-08-07 10:36 Writing to Memory and Page Alignment David Mc Kenna
@ 2003-08-07 12:06 ` Duane Ellis
  2003-08-07 13:53 ` Daniel Jacobowitz
  1 sibling, 0 replies; 4+ messages in thread
From: Duane Ellis @ 2003-08-07 12:06 UTC (permalink / raw)
  To: mckennad; +Cc: gdb, insight


>> Is it possible to force gdb to write data to a target in a page
   aligned ( boundary ) manner?

Yes - Use the Source Luke.

Not sure what you mean by $MF0,40 .. and $MF0,10

But -- ignoring that.

I presume you are using GDB remote in some form.

Look at the low level target read/write memory functions.

Example: "gdb/target.c - look at target_xfer_memory()"

Make your changes there - or what ever is the appropriate
target file(s) for your target. & build.

-Duane.

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

* Re: Writing to Memory and Page Alignment
  2003-08-07 10:36 Writing to Memory and Page Alignment David Mc Kenna
  2003-08-07 12:06 ` Duane Ellis
@ 2003-08-07 13:53 ` Daniel Jacobowitz
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2003-08-07 13:53 UTC (permalink / raw)
  To: gdb

On Thu, Aug 07, 2003 at 11:36:29AM +0100, David Mc Kenna wrote:
> Hi all,
> 
> Is it possible to force gdb to write data to a target in a page aligned ( boundary
> ) manner?
> 
> For example, I have flash memory which is located at 0x8000 and the page size
> is 256bytes. Under the current setup, gdb can overlap the pages and cause problems,
> e.g. $MF0,40:.......#CS, here pages 0 and 1 overlap. Is it possible to get gdb
> to split this command into two page aligned commands? i.e. $MF0,10:...#CS, page
> 0 written, and $M100,30:...#CS, page 1 written.

This sounds like something your remote stub (on the target) should be
taking care of.

If it can't, you could locally hack remote.c:remote_xfer_memory.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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

* Re: Writing to Memory and Page Alignment
@ 2003-08-07 12:19 David Mc Kenna
  0 siblings, 0 replies; 4+ messages in thread
From: David Mc Kenna @ 2003-08-07 12:19 UTC (permalink / raw)
  To: Duane Ellis, mckennad, gdb, insight

>>> Is it possible to force gdb to write data to a target in a page
>   aligned ( boundary ) manner?
>
>Yes - Use the Source Luke.
>
>Not sure what you mean by $MF0,40 .. and $MF0,10

These Commands are the Remote Serial Protocol.

Thanks for the suggestion about target.c

Cheers,
Dave
--
http://www.iol.ie

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

end of thread, other threads:[~2003-08-07 13:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-07 10:36 Writing to Memory and Page Alignment David Mc Kenna
2003-08-07 12:06 ` Duane Ellis
2003-08-07 13:53 ` Daniel Jacobowitz
2003-08-07 12:19 David Mc Kenna

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).