public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: insight@sources.redhat.com
Subject: [PATCH] Memory window: save updated address
Date: Thu, 01 Sep 2005 03:16:00 -0000	[thread overview]
Message-ID: <4316727C.8090202@redhat.com> (raw)

[-- 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}

                 reply	other threads:[~2005-09-01  3:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4316727C.8090202@redhat.com \
    --to=keiths@redhat.com \
    --cc=insight@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).