public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Re: memory window: bug wrt endianness
@ 2002-11-05  3:44 Ruppert
  0 siblings, 0 replies; 6+ messages in thread
From: Ruppert @ 2002-11-05  3:44 UTC (permalink / raw)
  To: insight; +Cc: ru

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 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
> 

Thank you! That did it; your changes to the function hex2bin solve
this issue (I am at present tied to version 5.1). Thanks again.

------------------------------
Regards
Dieter Ruppert
RTS GmbH
ru@swb.siemens.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: memory window: bug wrt endianness
@ 2002-11-05  4:42 Ruppert
  0 siblings, 0 replies; 6+ messages in thread
From: Ruppert @ 2002-11-05  4:42 UTC (permalink / raw)
  To: insight


...
> >Poor wording from my part. I meant the arrows in the "Address" edit box. Those
> >work as expected, in my case: they "move" the memory window in the indicated
> >direction.
> 
> Do they move a "windowful" or just one line? And can you move with the 
> arrow keys as well? For example, cursor in top left, what does "up arrow" do?

They move just one line. The arrow keys only move the cursor within the
window from one data cell to the next, they don't change the window
contents. "Up arrow" while cursor in top left has no visible effect. 

----------------------------------
Regards
Dieter Ruppert
RTS GmbH
ru@swb.siemens.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: memory window: bug wrt endianness
@ 2002-11-05  3:56 Ruppert
  0 siblings, 0 replies; 6+ messages in thread
From: Ruppert @ 2002-11-05  3:56 UTC (permalink / raw)
  To: insight


...
> >
> >I think I found a bug with the implementation of the memory...
> >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
> 
> Insight 5.1.1:
> 
> I tried this just out of curiosity and found out that I can't edit memory 
> at all. If I change a value in the memory window and click "update now" the 
> previous value reappears. Editing from console window works, though.

You need to press "Enter" after changing the value (at least it works like this
in my case). If I omit this, then, indeed, the edited value gets overwritten
from the target when I click "update now".

> 
> BTW, how can you scroll the memory window? If I set the memory address to 
> some free RAM location, I can only move within the window. Clicking the 
> little arrows in the "address" edit box sometimes moves one line at a time 
> (not back with the opposite pointing arrow) and finally causes jumping into 
> oblivion. Should there be normal PgUp/PgDn/Arrow key functionality?

Poor wording from my part. I meant the arrows in the "Address" edit box. Those
work as expected, in my case: they "move" the memory window in the indicated
direction.


---------------------------
Dieter Ruppert
RTS GmbH
ru@swb.siemens.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: memory window: bug wrt endianness
  2002-11-04  8:41 Ruppert
  2002-11-04 10:38 ` Keith Seitz
@ 2002-11-04 10:44 ` Martin M. Hunt
  1 sibling, 0 replies; 6+ messages in thread
From: Martin M. Hunt @ 2002-11-04 10:44 UTC (permalink / raw)
  To: Ruppert; +Cc: insight

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 <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 ?

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: memory window: bug wrt endianness
  2002-11-04  8:41 Ruppert
@ 2002-11-04 10:38 ` Keith Seitz
  2002-11-04 10:44 ` Martin M. Hunt
  1 sibling, 0 replies; 6+ messages in thread
From: Keith Seitz @ 2002-11-04 10:38 UTC (permalink / raw)
  To: Ruppert; +Cc: insight

On Mon, 4 Nov 2002, Ruppert wrote:

> 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).

Have you tried this in a newer version (like CVS head)? I seem to 
recollect some changes in the memory window wrt endianness problems being 
checked in...

If the problem still exists, we'll take it from there.
Keith


^ permalink raw reply	[flat|nested] 6+ messages in thread

* memory window: bug wrt endianness
@ 2002-11-04  8:41 Ruppert
  2002-11-04 10:38 ` Keith Seitz
  2002-11-04 10:44 ` Martin M. Hunt
  0 siblings, 2 replies; 6+ messages in thread
From: Ruppert @ 2002-11-04  8:41 UTC (permalink / raw)
  To: insight; +Cc: ru


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-11-05 12:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-05  3:44 memory window: bug wrt endianness Ruppert
  -- strict thread matches above, loose matches on Subject: below --
2002-11-05  4:42 Ruppert
2002-11-05  3:56 Ruppert
2002-11-04  8:41 Ruppert
2002-11-04 10:38 ` Keith Seitz
2002-11-04 10:44 ` Martin M. Hunt

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).