From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22835 invoked by alias); 22 Nov 2003 15:46:33 -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 22825 invoked from network); 22 Nov 2003 15:46:31 -0000 Received: from unknown (HELO localhost.redhat.com) (65.49.0.121) by sources.redhat.com with SMTP; 22 Nov 2003 15:46:31 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id DFC842B8F; Sat, 22 Nov 2003 10:46:23 -0500 (EST) Message-ID: <3FBF84CF.30401@gnu.org> Date: Sat, 22 Nov 2003 15:46:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jim Blandy Cc: gdb@sources.redhat.com Subject: Re: dynamic scope from frame, static scope from ??? References: <3FBF77A7.2070207@gnu.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-11/txt/msg00219.txt.bz2 > Andrew Cagney writes: > >> GDB's slowly pushing the frame through to the procedures that need >> access to the dynamic information. However, I don't know that we've >> addressed the case where a process needs access to the static >> information? Should there be dogma (similar to "there is always a >> frame") that covers the static case? >> >> Off hand I can think of several ways of doing this: >> >> - create a static-frame (it has no dynamic state) and use that >> - pass the source-and-line or block where needed >> functions would get both sal and a possibly null frame >> - pass some new structure that includes other info such as the >> selected language (if its different to what it should be)? > > > I think the meaning of a static context depends on the language in > which the user is working. For C and C++, for example, a static > context needs to include a specific source line, not just a block, so > as to be able to find which macros are in scope. True. Per: Can't use [some] macro's in conditional breakpoints http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=856 GDB currently gets this wrong :-( That rules out block as an option. > Internally, at least. As far as the user interface is concerned, GDB > should try to infer the appropriate language automatically. Right. To do that inference correctly the internals need to know the users current static context. The "frame" gives us a path to this information is when the program is running. I'm asking what should should be used to give us that information when the program isn't running? Andrew