From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26645 invoked by alias); 1 Sep 2005 03:16:21 -0000 Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org Received: (qmail 26622 invoked by uid 22791); 1 Sep 2005 03:16:16 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 01 Sep 2005 03:16:16 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j813GEXV002376 for ; Wed, 31 Aug 2005 23:16:14 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j813GEV01146 for ; Wed, 31 Aug 2005 23:16:14 -0400 Received: from [127.0.0.1] (sebastian-int.corp.redhat.com [172.16.52.221]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id j813GD54010410 for ; Wed, 31 Aug 2005 23:16:14 -0400 Message-ID: <4316727C.8090202@redhat.com> Date: Thu, 01 Sep 2005 03:16:00 -0000 From: Keith Seitz User-Agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720) MIME-Version: 1.0 To: insight@sources.redhat.com Subject: [PATCH] Memory window: save updated address Content-Type: multipart/mixed; boundary="------------000705040301090501050800" X-SW-Source: 2005-q3/txt/msg00093.txt.bz2 This is a multi-part message in MIME format. --------------000705040301090501050800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 407 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 From Dieter Ruppert : * library/memwin.itb (update_address): Change parameter name so that it does not shadow a member variable. Save the updated address internally. --------------000705040301090501050800 Content-Type: text/x-patch; name="memwin-update-addr.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="memwin-update-addr.patch" Content-length: 2205 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} --------------000705040301090501050800--