This is the mail archive of the
insight-prs@sourceware.org
mailing list for the Insight project.
insight/269: Addresses in memory window reset to default when format is changed
- From: dieter_ruppert at siemens dot com
- To: insight-gnats at sources dot redhat dot com
- Date: 14 Jul 2005 08:31:02 -0000
- Subject: insight/269: Addresses in memory window reset to default when format is changed
- Reply-to: dieter_ruppert at siemens dot com
>Number: 269
>Category: insight
>Synopsis: Addresses in memory window reset to default when format is changed
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 14 08:33:00 UTC 2005
>Closed-Date:
>Last-Modified:
>Originator: Insight-6.1
>Release: 6.1
>Organization:
>Environment:
Solaris 8 (Sparc)
>Description:
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.
>How-To-Repeat:
>Fix:
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.
*** 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
>Release-Note:
>Audit-Trail:
>Unformatted: