From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26204 invoked by alias); 6 Apr 2002 14:31:21 -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 26195 invoked from network); 6 Apr 2002 14:31:20 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 6 Apr 2002 14:31:20 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 005323CB5; Sat, 6 Apr 2002 09:31:19 -0500 (EST) Message-ID: <3CAF06B6.8030809@cygnus.com> Date: Sat, 06 Apr 2002 06:31:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.9) Gecko/20020328 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jim Blandy Cc: gdb@sources.redhat.com, Benjamin Kosnik , Daniel Berlin Subject: Re: C++ nested classes, namespaces, structs, and compound statements References: <20020406044204.245E45EA11@zwingli.cygnus.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00081.txt.bz2 > At the moment, GDB doesn't handle C++ namespaces or nested classes > very well. I have a general idea of how we could address these > limitations, which I'd like to put up for shredding M-DEL discussion. > > Let me admit up front that I don't really know C++, so I may be saying > stupid things. Please set me straight if you notice something. > > In C, structs are essentially lists of member names, types, and > locations (offsets from the structure's base address): > > struct S { int x; char y; struct T t; } > > (Unions are just the same, except that the offsets are all zero. That > relationship carries through the entire discussion here, so I'm not > going to talk about unions any more.) > > If you think about it just right (or just wrong), this is really very > similar to the set of local variables associated with a compound > statement: I'm very interested in hearing about what ACT did for Ada. As far as I know Ada, with its packages et.al. has a very similar problem and, potentially, working code. Andrew