This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: raw memory write?
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Németh Márton <nm127 at hszk dot bme dot hu>
- Cc: gdb at sources dot redhat dot com
- Date: Wed, 21 Jan 2004 14:14:24 -0500
- Subject: Re: raw memory write?
- References: <Pine.GSO.4.58.0401211957170.29029@ural2>
On Wed, Jan 21, 2004 at 08:08:35PM +0100, Németh Márton wrote:
> Hi!
>
> I'm testing an embedded system with gdb using remote target.
>
> Examining memor works fine as described at
> http://sources.redhat.com/gdb/onlinedocs/gdb_9.html#SEC59
>
> But I couldn't find any easy command with I could modify the content of
> a given memory address, only if I create a one-byte-long file containing
> my data.
>
> For example:
> --------------------------------------------------------
> (gdb) x/b 0x800000C0
> 0x800000c0: 0x00
> (gdb) restore one.dat binary 0x800000C0
> Restore file one.dat offset 0x800000c0 start 0x0 end 0x0
> Restoring binary file one.dat into memory (0x800000c0 to 0x800000c1)
Try:
(gdb) set *(char *)0x800000C0 = 0x01
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer