From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4269 invoked by alias); 21 Jan 2004 19:08:38 -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 4198 invoked from network); 21 Jan 2004 19:08:36 -0000 Received: from unknown (HELO ural2.hszk.bme.hu) (152.66.130.2) by sources.redhat.com with SMTP; 21 Jan 2004 19:08:36 -0000 Received: (from nm127@localhost) by ural2.hszk.bme.hu (8.12.8p1/8.12.8) id i0LJ8Z2X023398; Wed, 21 Jan 2004 20:08:35 +0100 (MET) Date: Wed, 21 Jan 2004 19:08:00 -0000 From: =?iso-8859-2?Q?N=E9meth_M=E1rton?= X-X-Sender: nm127@ural2 To: gdb@sources.redhat.com Subject: raw memory write? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-2 Content-Transfer-Encoding: QUOTED-PRINTABLE X-SW-Source: 2004-01/txt/msg00239.txt.bz2 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) (gdb) x/b 0x800000C0 0x800000c0: 0x01 (gdb) restore zero.dat binary 0x800000C0 Restore file zero.dat offset 0x800000c0 start 0x0 end 0x0 Restoring binary file zero.dat into memory (0x800000c0 to 0x800000c1) (gdb) x/b 0x800000C0 0x800000c0: 0x00 (gdb) -------------------------------------------------------- Do I need to create a file when I want to write a byte of data? Thanks. M=E1rton N=E9meth Student of Budapest University of Technology and Economics, Hungary