From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24041 invoked by alias); 17 Sep 2002 17:54:09 -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 23822 invoked from network); 17 Sep 2002 17:54:07 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 17 Sep 2002 17:54:07 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 789763DAA; Tue, 17 Sep 2002 13:54:07 -0400 (EDT) Message-ID: <3D876C3F.2090401@ges.redhat.com> Date: Tue, 17 Sep 2002 10:54: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> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00228.txt.bz2 > Well, sort of. It won't be a DAG necessarily (I think that mutual >> >"using" statements are legal in C++; I remember a GCC bug involving >> >them was fixed not long ago), and it will be somewhat complicated >> >figuring out which ones to look up (namespace links are different than >> >block scope links). > >> >> Don't forget that GDB doesn't need to model the language. Just the >> namespace behavior at a given PC. The effect of "using" would be to >> just grow a nametab in someway. > > > This is legal C++: > > namespace D {} > > namespace C { > using namespace D; > int x, y; > } > > namespace D { > using namespace C; > int x, z; > } > > If using just grew a nametab we'd get into a great deal of trouble. Depends on how you grow it :-) Something like (assuming a real language :-): D: 0: x, z 1: x, y (from C) 2: ... Andrew