From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30475 invoked by alias); 11 Sep 2002 18:36:20 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 30467 invoked from network); 11 Sep 2002 18:36:19 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 11 Sep 2002 18:36:19 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17pDHe-0007Nx-00; Wed, 11 Sep 2002 14:36:18 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17pCLk-00080I-00; Wed, 11 Sep 2002 14:36:28 -0400 Date: Wed, 11 Sep 2002 11:36:00 -0000 From: Daniel Jacobowitz To: David Carlton Cc: gdb Subject: Re: struct environment Message-ID: <20020911183628.GA30630@nevyn.them.org> Mail-Followup-To: David Carlton , gdb References: <20020906150620.GA19200@nevyn.them.org> <20020906175726.GA7265@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2002-09/txt/msg00102.txt.bz2 On Wed, Sep 11, 2002 at 11:33:08AM -0700, David Carlton wrote: > On 06 Sep 2002 11:56:14 -0700, David Carlton > said: > > > At some point, I'll give it a look: ALL_BLOCK_SYMBOLS is only used > > in 29 places, so it should be tractable to survey them by hand. > > And of course it turns out that, in at least one place, > ALL_BLOCK_SYMBOLS calls a function that, in turn, calls > ALL_BLOCK_SYMBOLS over the exact same block. Oops. > > But I think I was making too much of the memory-management > difficulties: I'll do iterators correctly (so you can have as many of > them active as you want), and just write an ALL_ENV_SYMBOLS macro that > allocates them on the stack using alloca(). Or you could just require an iterator to be declared in the function which uses ALL_BLOCK_SYMBOLS.... why bring alloca into it? The pointer you allocate into would need to be a local variable so the iterator might as well just be a local variable. Sure, it makes them a tiny bit less opaque. But make them opaque -in practice-. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer