From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29919 invoked by alias); 17 Feb 2004 19:47:58 -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 29902 invoked from network); 17 Feb 2004 19:47:57 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 17 Feb 2004 19:47:57 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 9342C2B92; Tue, 17 Feb 2004 14:47:55 -0500 (EST) Message-ID: <40326FEB.8050409@gnu.org> Date: Tue, 17 Feb 2004 19:47:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 MIME-Version: 1.0 To: Bob Rossi Cc: gdb@sources.redhat.com Subject: Re: [MI] -file-list-exec-source-files References: <20040213012946.GB4476@white> <20040216033008.GB2685@nevyn.them.org> <20040216034525.GA3437@white> <20040216034930.GA29864@nevyn.them.org> <20040216153329.GA3978@white> <20040216154628.GA996@nevyn.them.org> <20040216160835.GB3978@white> <40325BC5.4090403@gnu.org> <20040217191005.GA5982@white> <20040217191238.GA30895@nevyn.them.org> <20040217193001.GB5982@white> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-02/txt/msg00204.txt.bz2 > On Tue, Feb 17, 2004 at 02:12:38PM -0500, Daniel Jacobowitz wrote: > >> On Tue, Feb 17, 2004 at 02:10:05PM -0500, Bob Rossi wrote: > >> > I have one last question that didn't get answered, could the psymtab be >> > modified to contain the dirname? > >> >> Probably, but the dirname -> fullname conversion may be expensive - it >> involves a lot of stat() calls. > As a first cut, don't worry about performance (or more correctly scaleability). Just correctness (especially of the symtab interface). > 2. -file-list-exec-fetch-fullname [filename] > > This will be a new MI command. > > This will return a fullname given a filename. > If the symtab is read in, it calls source.c:symtab_to_filename. > If the symtab is not read in, it reads it in and calls the above > function. > > This function is necessary because all of the other MI commands still > output just the filename and not the fullname. For example, breakpoints, > stack, ... Er, isn't that a bug in the other commands? > 3. -file-list-exec-source-files [force_fullnames] > > This will implement an existing unimplemented MI command. > > By default, this will return > 1. filename for each psymtab, with no fullname > 2. filename/fullname for each symtab > > If the option "force_fullnames" is passed, it will have GDB convert all > of the psymtabs to symtabs, thus printing out the filename/fullname for > all symtabs. The overhead of doing this is probably high, and > undesirable by default. > > If the front end wants to be more efficient, it could show the user the > "filenames" and then do the "fullname" lookup just on that file. Thus, > only reading in one symtab. This specification is too heavily dependant on GDB's current underlying implementation - symtab and psymtab are internal details and do not belong in this interface specification. > I have one last question that didn't get answered, could the psymtab be > modified to contain the dirname? I was digging through this code, but it > seems a little hard core. Would it be difficult to just parse the > dirname out of the debug info? The reason I ask is because, if this is > possible, then I would no longer care about making the "force_fullname" > optional, I would just always do it, since the symtabs would not have to > be read, thus, taking away all of the overhead. This would defiantly be > desirable. Andrew