From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25947 invoked by alias); 4 Nov 2002 18:44:23 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 25911 invoked from network); 4 Nov 2002 18:44:23 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 4 Nov 2002 18:44:23 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id gA4ILvw19831 for ; Mon, 4 Nov 2002 13:21:57 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gA4IiMf09285; Mon, 4 Nov 2002 13:44:22 -0500 Received: from DRAGON (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gA4IiLT00816; Mon, 4 Nov 2002 13:44:21 -0500 Subject: Re: memory window: bug wrt endianness From: "Martin M. Hunt" To: Ruppert Cc: insight@sources.redhat.com In-Reply-To: <200211041641.gA4GfFD07597@fiji.swb.siemens.de> References: <200211041641.gA4GfFD07597@fiji.swb.siemens.de> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Mon, 04 Nov 2002 10:44:00 -0000 Message-Id: <1036435496.1145.3.camel@localhost.localdomain> Mime-Version: 1.0 X-SW-Source: 2002-q4/txt/msg00074.txt.bz2 On Mon, 2002-11-04 at 08:41, Ruppert wrote: > > Hi, > > I think I found a bug with the implementation of the memory > window in insight-5.1: values written to memory from the memory > window are written with the wrong endianness (at least in the "word" > representation of the window). > > This was observed on a Suse Linux system with insight-5.1 installed. > > > Consider the following trivial program: > > #include > > int i = 1; > > int main() { > printf("Hello World: %d\n",i); > return 0; > } > > At a breakpoint at the printf statement, I get in a console window: > > (gdb) p i > $1 = 1 > > (gdb) p &i > $2 = (int *) 0x8049518 > > When I open the memory window, it displays 0x00000001 in the field > which corresponds to address 0x8049518. Then I click into this field, > change this to 0x00000002 and press Enter. The field continues to > display 0x00000002. When I scroll up or down in the memory window > the contents of this field suddenly changes to 0x02000000. This value > appears also in the console window: > > (gdb) p /x i > $3 = 0x2000000 > > From this I conclude that the "memory write" from the memory window > in insight-5.1 has written the value of i with the wrong endianness. > This can also be seen when I change the "size" preference to "Byte": > the value "2" was written to 0x804951b and not to 0x8049518. > > I could myself do some debugging, so: Could anybody give me a hint where > to look for the reason for this ? This sounds like a bug I fixed a year ago. You could try the following patch, or just update to a newer release than 5.1. http://sources.redhat.com/ml/insight/2001-q4/msg00298.html Martin