From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9269 invoked by alias); 18 Feb 2004 14:24:45 -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 9242 invoked from network); 18 Feb 2004 14:24:42 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 18 Feb 2004 14:24:42 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id JAA05571 for ; Wed, 18 Feb 2004 09:41:10 -0500 Received: (from alain@localhost) by smtp.ott.qnx.com (8.8.8/8.6.12) with UUCP id JAA06208 for gdb@sources.redhat.com; Wed, 18 Feb 2004 09:24:37 -0500 Message-Id: <200402181424.JAA06208@smtp.ott.qnx.com> Subject: Re: [MI] -file-list-exec-source-files To: gdb@sources.redhat.com Date: Wed, 18 Feb 2004 14:24:00 -0000 From: "Alain Magloire" In-Reply-To: <20040216154628.GA996@nevyn.them.org> from "Daniel Jacobowitz" at Feb 16, 2004 10:46:28 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-02/txt/msg00224.txt.bz2 > > On Mon, Feb 16, 2004 at 10:33:29AM -0500, Bob Rossi wrote: > > Here is the problem I am trying to solve. > > > > Any front end needs to know the absolute path to the source files. From > > what I can see, there are several ways of finding the absolute path. > > In some cases, all of this info is needed. > > > So, basically, I am making an assumption, if GDB can not find the > > absolute path to the source file, the front end can not. Is this true? Not entirely. For example, Eclipse/CDT implements a mapping. That allow folks to "map" paths to a different value. > > Also, why should the front ends do it, if it can be done correctly in > > one place? > The source lookup is not done by gdb, when the editor comes highlighting the line, The IDE has a list of paths it has to search. It is/was not that important to set gdb's directory sources. > Then why are you trying to return symtab->dirname at all? Or have I > misinterpreted you, and you were returning symtab->fullname? I don't > think symtab->dirname should be exposed in this interface. > > > As far as I know, most existing front ends use annotate level 1-2-3 to > > figure out where the source file is. I just want to simplify this > > process, so that front ends can easily get the absolute path to the > > source file without having to run multiple commands, like the CLI. > > This sounds like the front end is only ever interested in one source > file at a time, so that would be a more efficient design than asking > GDB to provide fullnames for every source file at once. Agreed, we have folks using the CDT having > 10 000 files, source lookup is a pain. Having the fullPath is a definitive plus, even if we do processing like respecting the paths order and mapping.