From patchwork Thu Aug 13 01:46:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Brobecker X-Patchwork-Id: 8174 Received: (qmail 74031 invoked by alias); 13 Aug 2015 01:46:27 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 74022 invoked by uid 89); 13 Aug 2015 01:46:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 13 Aug 2015 01:46:24 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 6AEFE2913D; Wed, 12 Aug 2015 21:46:22 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RLPb-ymVRZdv; Wed, 12 Aug 2015 21:46:22 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 4437129134; Wed, 12 Aug 2015 21:46:22 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id A62DD46992; Wed, 12 Aug 2015 18:46:20 -0700 (PDT) From: Joel Brobecker To: gdb-patches@sourceware.org Cc: Keith Seitz Subject: [pushed] gdb.base/dso2dso.exp sometimes broken Date: Wed, 12 Aug 2015 18:46:18 -0700 Message-Id: <1439430378-6096-1-git-send-email-brobecker@adacore.com> In-Reply-To: <20150812202600.GA9183@adacore.com> References: <20150812202600.GA9183@adacore.com> From: Keith Seitz Hello, Keith reported that gdb.base/dso2dso.exp is broken, with the following error: | $ make check RUNTESTFLAGS=dso2dso.exp | [snip] | Running ../../../src/gdb/testsuite/gdb.base/dso2dso.exp ... | ERROR: tcl error sourcing ../../../src/gdb/testsuite/gdb.base/dso2dso.exp. | ERROR: couldn't open | "../../../src/gdb/testsuite/gdb.base/../../../src/gdb/testsuite/gdb.base/dso2dso-dso1.c": | no such file or directory | while executing | "error "$message"" | (procedure "gdb_get_line_number" line 14) | invoked from within | "gdb_get_line_number "STOP HERE" $srcfile_libdso1" | (file "../../../src/gdb/testsuite/gdb.base/dso2dso.exp" line 60) | invoked from within | "source ../../../src/gdb/testsuite/gdb.base/dso2dso.exp" | ("uplevel" body line 1) | invoked from within | "uplevel #0 source ../../../src/gdb/testsuite/gdb.base/dso2dso.exp" | invoked from within | "catch "uplevel #0 source $test_file_name"" This happens because gdb_get_line_number will prepend $srcdir/$subdir if the given filename does not start with "/", and this happens when GDB was configured using a relative path to the configure script. When using an absolute path like I do, we avoid the pre-pending that Keith is seeing. gdb/testsuite/ChangeLog: Keith Seitz : * gdb.base/dso2dso.exp: Pass basename of source file in call to gdb_get_line_number. Tested on x86_64-linux with both scenarios. Pushing now... Thanks Keith! diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 738c927..b44869d 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-08-12 Keith Seitz + + * gdb.base/dso2dso.exp: Pass basename of source file in call to + gdb_get_line_number. + 2015-08-12 Joel Brobecker * gdb.base/dso2dso-dso2.c, gdb.base/dso2dso-dso2.h, diff --git a/gdb/testsuite/gdb.base/dso2dso.exp b/gdb/testsuite/gdb.base/dso2dso.exp index 16eb1f3..c1873ba 100644 --- a/gdb/testsuite/gdb.base/dso2dso.exp +++ b/gdb/testsuite/gdb.base/dso2dso.exp @@ -63,7 +63,7 @@ if { ![runto_main] } { return -1 } -set bp_location [gdb_get_line_number "STOP HERE" $srcfile_libdso1] +set bp_location [gdb_get_line_number "STOP HERE" [file tail $srcfile_libdso1]] gdb_breakpoint ${srcfile_libdso1}:${bp_location} gdb_continue_to_breakpoint "at call to sub2" \