From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5076 invoked by alias); 6 Aug 2008 06:36:38 -0000 Received: (qmail 5068 invoked by uid 22791); 6 Aug 2008 06:36:37 -0000 X-Spam-Check-By: sourceware.org Received: from hoat.troll.no (HELO hoat.troll.no) (62.70.27.150) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 06 Aug 2008 06:35:58 +0000 Received: from hoat.troll.no (tedur.troll.no [62.70.27.154]) by hoat.troll.no (Postfix) with SMTP id 3316620B3B for ; Wed, 6 Aug 2008 08:35:53 +0200 (CEST) Received: from gar.trolltech.de (gar.trolltech.de [10.4.0.24]) by hoat.troll.no (Postfix) with ESMTP id 1C9C42059D for ; Wed, 6 Aug 2008 08:35:53 +0200 (CEST) From: =?iso-8859-1?q?Andr=E9_P=F6nitz?= To: gdb@sourceware.org Subject: Re: Manipulating memory Date: Wed, 06 Aug 2008 06:36:00 -0000 User-Agent: KMail/1.9.9 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200808060838.41498.apoenitz@trolltech.com> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00091.txt.bz2 On Tuesday 05 August 2008 21:03:38 Eran Ifrah wrote: > Hi, >=20 > I have read the GDB manual, and I could not find a way to manipulate a > memory, for example: set values at given address. I only found a way > to view it using '-data-read-memory' command, > is this true or did I miss something? I'd be glad if someone had a real solution for that task, too. So far I used something along the lines of call sprintf(address, "%d %s ..", token, ... ) to write something to target memory, but I am looking for an alternative too, as this gets mis-parsed in some cases. Maybe=20=20 restore filename [binary] bias start end as described in section 8.16 of the manual would help, but that seems to require the contents to be put in a file first. Not really convenient eithe= r... Regards, Andr=E9