public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* small bug in memory window
@ 2005-07-06  9:36 Ruppert
  0 siblings, 0 replies; only message in thread
From: Ruppert @ 2005-07-06  9:36 UTC (permalink / raw)
  To: insight; +Cc: dieter_ruppert


Hi,

we noticed a small bug in Insight's memory window: when the
display format is changed, (from "Word" to "Byte", for example),
the address displayed resets back to the default (which is
usually the start of the .data section).

I looked at the code in memwin.itb, and the reason seems obvious:
the member variable MemWin::addr_exp is never updated (after being
initialized to .data). MemWin::reconfig, which is called after 
a format change, uses this value, and therefore resets the address
to the default.

A simple one-line change fixes this; I include a small patch below.
BTW: this was Insight from gdb-6.1, but memwin.itb apparently hasn't 
changed since then.


Best Regards
Dieter Ruppert




*** memwin.itb          Wed Jul  6 11:04:41 2005
--- memwin.itb.new      Wed Jul  6 11:06:34 2005
***************
*** 512,517 ****
--- 512,519 ----
      incr index -1
      set current_addr [string range $current_addr 0 $index]
    }
+ 
+   set MemWin::addr_exp $addr_exp
    
    # set table background
    $itk_component(table) config -bg $::Colors(textbg) -state normal


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-06  9:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-06  9:36 small bug in memory window Ruppert

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