From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9991 invoked by alias); 8 Mar 2012 22:02:01 -0000 Received: (qmail 9973 invoked by uid 22791); 8 Mar 2012 22:02:00 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 08 Mar 2012 22:01:47 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q28M1lkK015579 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 8 Mar 2012 17:01:47 -0500 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q28M1ipL004335 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 8 Mar 2012 17:01:46 -0500 Message-ID: <4F592C48.7000500@redhat.com> Date: Thu, 08 Mar 2012 22:02:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: "gdb-patches@sourceware.org ml" Subject: [RFA] gdb_get_line_number on unknown tags Content-Type: multipart/mixed; boundary="------------030600020203050308040401" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00294.txt.bz2 This is a multi-part message in MIME format. --------------030600020203050308040401 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 797 Hi, I noticed that two tests in the test suite attempt to set a breakpoint on line -1 of some source file. This is occurring because the two tests which do it are using gdb_get_line_number on a tag which is not defined in the source file. Consequently, gdb_get_line_number returns -1, and gdb_breakpoint does "break srcfile:-1", which currently defaults to line 1. I think this ambiguity should be avoided in the test suite, and I submit the attached trivial patch to correct it. Tested on x86_64-linux (Fedora 15) with no regressions. Keith testsuite/ChangeLog 2012-03-08 Keith Seitz * gdb.ada/array_bounds.exp: Get breakpoint for line with "START", not "STOP". * gdb.python/py-infthread.exp: Do not continue to line marked "Break here.", which is undefined. --------------030600020203050308040401 Content-Type: text/x-patch; name="negative-bp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="negative-bp.patch" Content-length: 1039 diff --git a/gdb/testsuite/gdb.ada/array_bounds.exp b/gdb/testsuite/gdb.ada/array_bounds.exp index a726e71..493c7c3 100644 --- a/gdb/testsuite/gdb.ada/array_bounds.exp +++ b/gdb/testsuite/gdb.ada/array_bounds.exp @@ -27,7 +27,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } clean_restart ${testfile} -set bp_location [gdb_get_line_number "STOP" ${testdir}/bar.adb] +set bp_location [gdb_get_line_number "START" ${testdir}/bar.adb] if ![runto "bar.adb:$bp_location" ] then { perror "Couldn't run ${testfile}" return diff --git a/gdb/testsuite/gdb.python/py-infthread.exp b/gdb/testsuite/gdb.python/py-infthread.exp index 5fa508f..491cc41 100644 --- a/gdb/testsuite/gdb.python/py-infthread.exp +++ b/gdb/testsuite/gdb.python/py-infthread.exp @@ -37,8 +37,6 @@ if ![runto_main] then { return 0 } -runto [gdb_get_line_number "Break here."] - # Test basic gdb.Inferior attributes and methods. gdb_py_test_silent_cmd "python t0 = gdb.selected_thread ()" "test gdb.selected_thread" 1 --------------030600020203050308040401--