From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23111 invoked by alias); 17 Nov 2005 19:53:49 -0000 Received: (qmail 23101 invoked by uid 22791); 17 Nov 2005 19:53:47 -0000 Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.205) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 17 Nov 2005 19:53:47 +0000 Received: by zproxy.gmail.com with SMTP id l1so8948nzf for ; Thu, 17 Nov 2005 11:53:46 -0800 (PST) Received: by 10.36.24.5 with SMTP id 5mr7856998nzx; Thu, 17 Nov 2005 11:53:46 -0800 (PST) Received: by 10.37.2.35 with HTTP; Thu, 17 Nov 2005 11:53:45 -0800 (PST) Message-ID: <8f2776cb0511171153x180b527ya463f6bd17a3e4f4@mail.gmail.com> Date: Fri, 18 Nov 2005 01:27:00 -0000 From: Jim Blandy To: Jim Blandy , Andrew STUBBS , gdb-patches@sources.redhat.com Subject: Re: [PATCH] Fixup convenience variables on endian switch In-Reply-To: <20051117190240.GA19136@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <437B4291.3050006@st.com> <20051117034505.GA3057@nevyn.them.org> <437C79F7.9080404@st.com> <8f2776cb0511171058y365da93y26bc50eaa43d928d@mail.gmail.com> <20051117190240.GA19136@nevyn.them.org> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-11/txt/msg00303.txt.bz2 On 11/17/05, Daniel Jacobowitz wrote: > On Thu, Nov 17, 2005 at 10:58:51AM -0800, Jim Blandy wrote: > > On 11/17/05, Andrew STUBBS wrote: > > > The problem I am actually trying to solve is that we have addresses a= nd > > > such set up by a script that is sourced before the endian of the targ= et > > > they will be used with is known. > > > > So you only really need to preserve convenience variables whose types > > are builtin types, and don't go away when symbol tables are reloaded. > > Wouldn't it be simpler just to have clear_internalvars only clear > > variables whose types belong to objfiles? > > I think you've switched patches - this is about updating variables on > an endianness switch, not clearing them when we reload. No, it's popping up a level to figure out how to best address the original problem. In light of your stories about losing values, and given Andrew's description of the troubles that motivated him, I'd agree that simply always preserving the values of convenience variables that we know how to preserve is the way to go.