* [PATCH] Memory window: save updated address
@ 2005-09-01 3:16 Keith Seitz
0 siblings, 0 replies; only message in thread
From: Keith Seitz @ 2005-09-01 3:16 UTC (permalink / raw)
To: insight
[-- Attachment #1: Type: text/plain, Size: 407 bytes --]
Hi,
I've committed the following patched based on the patch from insight/269
from Dieter Ruppert from Siemens.
Keith
ChangeLog
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.
[-- Attachment #2: memwin-update-addr.patch --]
[-- Type: text/x-patch, Size: 2205 bytes --]
Index: library/memwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/memwin.itb,v
retrieving revision 1.22
diff -u -p -r1.22 memwin.itb
--- library/memwin.itb 13 Nov 2002 20:17:10 -0000 1.22
+++ library/memwin.itb 1 Sep 2005 03:11:40 -0000
@@ -469,13 +469,13 @@ itcl::body MemWin::update_address_cb {}
# ------------------------------------------------------------------
# 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]} {
@@ -488,21 +488,21 @@ itcl::body MemWin::update_address {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
}
@@ -513,6 +513,8 @@ itcl::body MemWin::update_address {addr_
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}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-09-01 3:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-01 3:16 [PATCH] Memory window: save updated address Keith Seitz
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).