From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12861 invoked by alias); 17 Nov 2005 18:58:55 -0000 Received: (qmail 12847 invoked by uid 22791); 17 Nov 2005 18:58:52 -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 18:58:52 +0000 Received: by zproxy.gmail.com with SMTP id l1so2492739nzf for ; Thu, 17 Nov 2005 10:58:51 -0800 (PST) Received: by 10.36.216.6 with SMTP id o6mr4859817nzg; Thu, 17 Nov 2005 10:58:51 -0800 (PST) Received: by 10.37.2.35 with HTTP; Thu, 17 Nov 2005 10:58:51 -0800 (PST) Message-ID: <8f2776cb0511171058y365da93y26bc50eaa43d928d@mail.gmail.com> Date: Thu, 17 Nov 2005 19:22:00 -0000 From: Jim Blandy To: Andrew STUBBS Subject: Re: [PATCH] Fixup convenience variables on endian switch Cc: Daniel Jacobowitz , gdb-patches@sources.redhat.com In-Reply-To: <437C79F7.9080404@st.com> 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> 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/msg00290.txt.bz2 On 11/17/05, Andrew STUBBS wrote: > The problem I am actually trying to solve is that we have addresses and > such set up by a script that is sourced before the endian of the target > 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.=20 Wouldn't it be simpler just to have clear_internalvars only clear variables whose types belong to objfiles? Or you could define a hook that runs a user-defined command when the architecture changes. Then your script could define a command that sets up your variables, and have GDB run that command when the architecture is known. We'd have to think about the best time to run the hook, but I'm sure something reasonable could be worked out.