OSDN Git Service

From Dieter Ruppert <dieter_ruppert@siemens.com>:
authorKeith Seitz <keiths@redhat.com>
Thu, 1 Sep 2005 03:16:03 +0000 (03:16 +0000)
committerKeith Seitz <keiths@redhat.com>
Thu, 1 Sep 2005 03:16:03 +0000 (03:16 +0000)
        * library/memwin.itb (update_address): Change parameter name
        so that it does not shadow a member variable.
        Save the updated address internally.

gdb/gdbtk/ChangeLog
gdb/gdbtk/library/memwin.itb

index c8bfd2e..f87dade 100644 (file)
@@ -1,3 +1,10 @@
+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>:
index 4c71ed0..78c4639 100644 (file)
@@ -1,5 +1,5 @@
 # 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
@@ -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_exp} {
        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_exp} {
     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}