From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19612 invoked by alias); 9 Aug 2004 17:55:41 -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 19598 invoked from network); 9 Aug 2004 17:55:39 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.77.109) by sourceware.org with SMTP; 9 Aug 2004 17:55:39 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i79HtaZt000700; Mon, 9 Aug 2004 19:55:36 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i79HtamT038669; Mon, 9 Aug 2004 19:55:36 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6/Submit) id i79Hta9D038666; Mon, 9 Aug 2004 19:55:36 +0200 (CEST) Date: Mon, 09 Aug 2004 17:55:00 -0000 Message-Id: <200408091755.i79Hta9D038666@elgar.kettenis.dyndns.org> From: Mark Kettenis To: mec.gnu@mindspring.com CC: gdb-patches@sources.redhat.com In-reply-to: <4116516C.nailLPL1BAKH4@mindspring.com> (message from Michael Chastain on Sun, 08 Aug 2004 12:14:36 -0400) Subject: Re: [patch/testsuite] lib/gdb.exp: native tcl gdb_get_line_number References: <4116516C.nailLPL1BAKH4@mindspring.com> X-SW-Source: 2004-08/txt/msg00323.txt.bz2 Date: Sun, 08 Aug 2004 12:14:36 -0400 From: Michael Chastain 2004-08-08 Michael Chastain * lib/gdb.exp (gdb_get_line_number): Rewrite with native tcl rather than asking gdb to search. This causes problems if you configure using a relative pathname, i.e. ../src/configure --enable-gdb-build-warnings=,-Werror Because relative pathnames don't start with /, gdb_get_line_number will prepend the source directory yet another time. That won't work. The attached patch fixes things for me, but can somebody please check whether i've escaped the dot correctly? Index: testsuite/ChangeLog from Mark Kettenis * lib/gdb.exp: Recognize relative path names as well as absolute ones. Index: testsuite/lib/gdb.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v retrieving revision 1.54 diff -u -p -r1.54 gdb.exp --- testsuite/lib/gdb.exp 9 Aug 2004 13:16:15 -0000 1.54 +++ testsuite/lib/gdb.exp 9 Aug 2004 17:54:47 -0000 @@ -1874,7 +1874,7 @@ proc gdb_get_line_number { text { file " if { "$file" == "" } then { set file "$srcfile" } - if { ! [regexp "^/" "$file"] } then { + if { ! [regexp "^(/|\\.)" "$file"] } then { set file "$srcdir/$subdir/$file" }