From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11100 invoked by alias); 21 Jan 2004 19:14:26 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 11044 invoked from network); 21 Jan 2004 19:14:25 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 21 Jan 2004 19:14:25 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1AjNo0-0005ki-CE; Wed, 21 Jan 2004 14:14:24 -0500 Date: Wed, 21 Jan 2004 19:14:00 -0000 From: Daniel Jacobowitz To: =?iso-8859-1?Q?N=E9meth_M=E1rton?= Cc: gdb@sources.redhat.com Subject: Re: raw memory write? Message-ID: <20040121191423.GA21575@nevyn.them.org> Mail-Followup-To: =?iso-8859-1?Q?N=E9meth_M=E1rton?= , gdb@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2004-01/txt/msg00240.txt.bz2 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