From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5504 invoked by alias); 18 Sep 2002 15:13:42 -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 5487 invoked from network); 18 Sep 2002 15:13:36 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 18 Sep 2002 15:13:36 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id B14693CC6; Wed, 18 Sep 2002 11:13:34 -0400 (EDT) Message-ID: <3D88981E.2050603@ges.redhat.com> Date: Wed, 18 Sep 2002 08:13:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: David Carlton , gdb Subject: Re: struct environment References: <3D86DE18.6030003@ges.redhat.com> <20020917134057.GA26237@nevyn.them.org> <3D875149.9080502@ges.redhat.com> <20020917160700.GA20451@nevyn.them.org> <3D876C3F.2090401@ges.redhat.com> <20020917180211.GA23552@nevyn.them.org> <3D878496.6010201@ges.redhat.com> <20020917194127.GA28509@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00257.txt.bz2 > On Tue, Sep 17, 2002 at 03:37:58PM -0400, Andrew Cagney wrote: > >> > >> >>Depends on how you grow it :-) Something like (assuming a real language >> >>:-): >> >> D: >> >> 0: x, z >> >> 1: x, y (from C) >> >> 2: ... > >> > >> > >> >How you intend to do this efficiently I don't know. > >> >> By efficiency did you mean speed or memory? I don't see speed being an >> issue (except for the global table), just memory (GDB's foot print growing). > > > Either. It's quite a hard problem, which is a reason why C++ compilers > generally use Koenig lookup through multiple blocks rather than growing > blocks. And there's all sorts of other correctness issues. {I'd better find out what a koenig lookup is. I think I just tried to described one :-) The correctness of course does need to come before the efficience. So I guess (to back out) if the choice is between burning memory and having GDB print a correct value and being memory efficient but wrong, then the first is the correct choice. Andrew >> > Remember that C >> > uses D in turn, and that things "using"'d into D will therefore be >> > visible in C. > >> >> True, but I'm not the one implementing this. I'm just trying to >> understand the core-gdb interface. >> >> Andrew >> >> >> > > > -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer