From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20483 invoked by alias); 9 Apr 2003 20:30:31 -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 20411 invoked from network); 9 Apr 2003 20:30:30 -0000 Received: from unknown (HELO white) (68.14.146.65) by sources.redhat.com with SMTP; 9 Apr 2003 20:30:30 -0000 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 193MDA-0005sE-00; Wed, 09 Apr 2003 16:30:24 -0400 Date: Wed, 09 Apr 2003 20:30:00 -0000 From: Bob Rossi To: David Carlton Cc: gdb , Andrew Cagney , Elena Zannoni Subject: Re: bug in gdb.mi/mi-file.exp (or maybe in GDB) Message-ID: <20030409203024.GA22063@white> Mail-Followup-To: David Carlton , gdb , Andrew Cagney , Elena Zannoni References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i X-SW-Source: 2003-04/txt/msg00083.txt.bz2 On Wed, Apr 09, 2003 at 01:01:41PM -0700, David Carlton wrote: > When I run gdb.mi/mi-file.exp, I get this failure: > > FAIL: gdb.mi/mi-file.exp: request path info of current source file (basics.c) > > Presumably nobody else is seeing this because I'm the only weirdo who > builds in source. I think it's probably a testsuite bug instead of a > GDB bug, but I don't know exactly what the relevant MI command is > supposed to do, so I'll just show you what I'm seeing: gdb.log says: > > 111^done,line="23",file="gdb.mi/basics.c",fullname="/extra/gdb/mirror/src/gdb/testsuite/gdb.mi/basics.c" > > whereas mi-file.exp is looking for: > > "111\\\^done,line=\"23\",file=\"${srcfilepath}\",fullname=\"/.*/${srcfile}\"" This is what I get, which passes 111^done,line="23",file="./gdb.mi/basics.c",fullname="/home/bob/cvs/src/gdb/testsuite/gdb.mi/basics.c"^ > > where ${srcfilepath} is defined by: > > set srcfilepath [string_to_regexp ${srcdir}/${subdir}/${srcfile}] > > So the test seems to expect 'file' to be the fully qualified path and > for 'fullname' to be anything random that starts with a slash and ends > right. Whereas I'm not getting a fully qualified path for 'file'. > So: is 'file' really supposed to be a fully qualified path? If so, > what's the difference between 'file' and 'fullname'? file should be the path that gdb has always produced. The relative path to the source file given from where it was compiled. Its basically what you should get when you do 'info sources'. fullname should be the absolute path to the source file. I only tested it for starting with a / and ending with basics.c because that seemed to be a good and easy way to ensure the file was absolute. > Should 'file' match .*${srcfile} > (without any slashes) and 'fullname' match ${srcfilepath}? I think your suggestion of what file should match is a good one. The fullname match should probably not change. Since ${srcfilepath} is not guaranteed to be the absolute path to the source file. > Also, should gdb.mi have its own ChangeLog? It's being used > inconsistently, since most of the recent entries got put in > testsuite/ChangeLog. > > David Carlton > carlton@math.stanford.edu