From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5812 invoked by alias); 17 Feb 2004 19:10:08 -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 5803 invoked from network); 17 Feb 2004 19:10:06 -0000 Received: from unknown (HELO lakemtao04.cox.net) (68.1.17.241) by sources.redhat.com with SMTP; 17 Feb 2004 19:10:06 -0000 Received: from white ([68.9.64.121]) by lakemtao04.cox.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040217191006.IFID19895.lakemtao04.cox.net@white> for ; Tue, 17 Feb 2004 14:10:06 -0500 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 1AtAbd-0001ZT-00 for ; Tue, 17 Feb 2004 14:10:05 -0500 Date: Tue, 17 Feb 2004 19:10:00 -0000 From: Bob Rossi To: gdb@sources.redhat.com Subject: Re: [MI] -file-list-exec-source-files Message-ID: <20040217191005.GA5982@white> Mail-Followup-To: gdb@sources.redhat.com 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40325BC5.4090403@gnu.org> User-Agent: Mutt/1.3.28i X-SW-Source: 2004-02/txt/msg00196.txt.bz2 I have decided on an interface. Please respond to let me know if this is acceptable, and I will implement it. (Although I already have most of it implemented) 1. -file-list-exec-source-file This will remain the same. It only tells the front end the current filename,fullname and line number. 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, ... 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. 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. Thanks, Bob Rossi