This is the mail archive of the
mailing list for the Insight project.
small bug in memory window
- From: Ruppert <dieter_ruppert at siemens dot com>
- To: insight at sourceware dot org
- Cc: dieter_ruppert at siemens dot com
- Date: Wed, 6 Jul 2005 11:33:58 +0200 (MEST)
- Subject: small bug in memory window
- Reply-to: Ruppert <dieter_ruppert at siemens dot com>
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.
*** 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