From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16413 invoked by alias); 31 Mar 2003 18:56:20 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16404 invoked from network); 31 Mar 2003 18:56:18 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 31 Mar 2003 18:56:18 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 80DD02B23; Mon, 31 Mar 2003 13:56:17 -0500 (EST) Message-ID: <3E888F51.6050209@redhat.com> Date: Mon, 31 Mar 2003 18:56:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bob Rossi Cc: gdb-patches@sources.redhat.com Subject: Re: Adding -file-list-exec-source-file command to GDB/MI References: <20030329004109.GA7487@white> <3E87D445.70609@redhat.com> <20030331184616.GE10233@white> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-03/txt/msg00612.txt.bz2 > On Mon, Mar 31, 2003 at 12:38:13AM -0500, Andrew Cagney wrote: > >> >This change essentially adds the command -file-list-exec-source-file to >> >the mi commands. >> > >> >* mi-cmd-file.c: Added file to implement mi file commands. >> >* mi-cmds.c: Added -file-list-exec-source-file command. >> >* mi-cmds.h: Added -file-list-exec-source-file to proto list. >> >* doc/gdb.texinfo: Document -file-list-exec-source-file. > >> >> > >> >* mi-file.exp: Added testcase to test -file-list-exec-source-file. > >> >> I've attached a slightly tweaked version. It was checking for the path >> to the executable instead of the source file (separate build / config >> directories is the norm) (I'm also not sure what would happen if the >> configure contained a relative path but worry about that when someone >> notices :-) > > > I am noticing this now. The variable > set abs_srcfile [string_to_regexp ${srcdir}/${subdir}/${srcfile}] > has the value ("\./gdb\.mi/basics\.c") when I run the testcase. > This is why I made it check for the path to the executable in the first > place. > > What do you think we should do here? I have no idea. Unfortunatly ditto. A pattern like: "/.*/${srcfile}" would at least check that it has gained a leading slash. Expect/Dejagnu must have a realpath equivalent. Unfortunatly, I don't know what it is. > I like fullname because it is used already in symtab.h > > /* Full name of file as found by searching the source path. > NULL if not yet known. */ > > char *fullname; sold. Andrew