+2005-08-31 Keith Seitz <keiths@redhat.com>
+
+ From Dieter Ruppert <dieter_ruppert@siemens.com>:
+ * library/memwin.itb (update_address): Change parameter name
+ so that it does not shadow a member variable.
+ Save the updated address internally.
+
2005-06-13 Keith Seitz <keiths@redhat.com>
From Charles Brockman <mr hyphen chuck at att dot net>:
# Memory display window class definition for Insight.
-# Copyright 1998, 1999, 2001, 2002 Red Hat, Inc.
+# Copyright 1998, 1999, 2001, 2002, 2005 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
# ------------------------------------------------------------------
# METHOD: update_address - update address and data displayed
# ------------------------------------------------------------------
-itcl::body MemWin::update_address {addr_exp} {
+itcl::body MemWin::update_address {addr} {
set bad_expr 0
set saved_addr $current_addr
- if {[string match {[a-zA-Z_&0-9\*]*} $addr_exp]} {
+ if {[string match {[a-zA-Z_&0-9\*]*} $addr]} {
# Looks like an expression
- set retVal [catch {gdb_eval "$addr_exp" x} current_addr]
+ set retVal [catch {gdb_eval "$addr" x} current_addr]
#debug "retVal=$retVal current_addr=$current_addr"
if {$retVal || [string match "No symbol*" $current_addr] || \
[string match "Invalid *" $current_addr]} {
return
}
}
- } elseif {[regexp {\$[a-zA-Z_]} $addr_exp]} {
+ } elseif {[regexp {\$[a-zA-Z_]} $addr]} {
# Looks like a local variable
- set retVal [catch {gdb_eval "$addr_exp" x} current_addr]
+ set retVal [catch {gdb_eval "$addr" x} current_addr]
#debug "retVal=$retVal current_addr=$current_addr"
if {$retVal} {
BadExpr $current_addr
return
}
if {$current_addr == "void"} {
- BadExpr "No Local Variable Named \"$addr_exp\""
+ BadExpr "No Local Variable Named \"$addr\""
return
}
} else {
# something really strange, like "0.1" or ""
- BadExpr "Can't Evaluate \"$addr_exp\""
+ BadExpr "Can't Evaluate \"$addr\""
return
}
set current_addr [string range $current_addr 0 $index]
}
+ set addr_exp $addr
+
# set table background
$itk_component(table) config -bg $::Colors(textbg) -state normal
catch {update_addr}