From: Ruppert <ru@swb.siemens.de>
To: insight@sources.redhat.com
Cc: ru@swb.siemens.de
Subject: memory window: bug wrt endianness
Date: Mon, 04 Nov 2002 08:41:00 -0000 [thread overview]
Message-ID: <200211041641.gA4GfFD07597@fiji.swb.siemens.de> (raw)
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 <stdio.h>
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 ?
-------------------
Regards
Dieter Ruppert
RTS GmbH
ru@swb.siemens.de
next reply other threads:[~2002-11-04 16:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-04 8:41 Ruppert [this message]
2002-11-04 10:38 ` Keith Seitz
2002-11-04 10:44 ` Martin M. Hunt
2002-11-05 3:44 Ruppert
2002-11-05 3:56 Ruppert
2002-11-05 4:42 Ruppert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200211041641.gA4GfFD07597@fiji.swb.siemens.de \
--to=ru@swb.siemens.de \
--cc=insight@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).