From patchwork Wed Oct 29 16:00:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 3472 Received: (qmail 14922 invoked by alias); 29 Oct 2014 16:02:55 -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 14876 invoked by uid 89); 29 Oct 2014 16:02:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp17.uk.ibm.com Received: from e06smtp17.uk.ibm.com (HELO e06smtp17.uk.ibm.com) (195.75.94.113) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 29 Oct 2014 16:02:54 +0000 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 29 Oct 2014 16:02:51 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp17.uk.ibm.com (192.168.101.147) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 29 Oct 2014 16:02:49 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id B76092190043 for ; Wed, 29 Oct 2014 16:02:24 +0000 (GMT) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s9TG2ncd62390474 for ; Wed, 29 Oct 2014 16:02:49 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s9TG2mgA004396 for ; Wed, 29 Oct 2014 10:02:48 -0600 Received: from br87z6lw.boeblingen.de.ibm.com (dyn-9-152-212-196.boeblingen.de.ibm.com [9.152.212.196]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s9TG0lWS032270 for ; Wed, 29 Oct 2014 10:02:48 -0600 From: Andreas Arnez To: gdb-patches@sourceware.org Subject: [PATCH 09/16] Eliminate literal line numbers in mi-console.exp Date: Wed, 29 Oct 2014 17:00:24 +0100 Message-Id: <1414598446-13831-9-git-send-email-arnez@linux.vnet.ibm.com> In-Reply-To: <1414597859-12523-1-git-send-email-arnez@linux.vnet.ibm.com> References: <1414597859-12523-1-git-send-email-arnez@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14102916-0029-0000-0000-0000016ABBC7 X-IsSubscribed: yes Remove the literal line number from a regexp in mi-console.exp. Add an appropriate eye-catcher to mi-console.c and refer to that instead. gdb/testsuite/ChangeLog: * gdb.mi/mi-console.c: Add eye-catcher. * gdb.mi/mi-console.exp (semihosted_string): Refer to eye-catcher instead of literal line number. --- gdb/testsuite/gdb.mi/mi-console.c | 2 +- gdb/testsuite/gdb.mi/mi-console.exp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.mi/mi-console.c b/gdb/testsuite/gdb.mi/mi-console.c index ffed9f0..0cd2243 100644 --- a/gdb/testsuite/gdb.mi/mi-console.c +++ b/gdb/testsuite/gdb.mi/mi-console.c @@ -11,4 +11,4 @@ int main () { hello (); -} +} /* after-hello */ diff --git a/gdb/testsuite/gdb.mi/mi-console.exp b/gdb/testsuite/gdb.mi/mi-console.exp index a98cba3..86645c0 100644 --- a/gdb/testsuite/gdb.mi/mi-console.exp +++ b/gdb/testsuite/gdb.mi/mi-console.exp @@ -89,7 +89,8 @@ mi_gdb_test "220-exec-next" \ "Testing console output" \ $output -mi_expect_stop "end-stepping-range" "main" "" ".*mi-console.c" "14" "" \ +set line [gdb_get_line_number "after-hello"] +mi_expect_stop "end-stepping-range" "main" "" ".*mi-console.c" $line "" \ "finished step over hello" mi_gdb_exit