From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6033 invoked by alias); 27 Oct 2015 05:39:38 -0000 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 Received: (qmail 5954 invoked by uid 89); 27 Oct 2015 05:39:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.8 required=5.0 tests=AWL,BAYES_20,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: heian.cn.fujitsu.com Received: from cn.fujitsu.com (HELO heian.cn.fujitsu.com) (59.151.112.132) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Oct 2015 05:39:30 +0000 Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 27 Oct 2015 13:41:37 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id t9R5cnKo008970 for ; Tue, 27 Oct 2015 13:38:49 +0800 Received: from localhost.localdomain (10.167.226.91) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Tue, 27 Oct 2015 13:39:22 +0800 From: Fei Jie To: Subject: [PATCH] Add testcases to gdb.base/break.exp Date: Tue, 27 Oct 2015 11:25:00 -0000 Message-ID: <1445924337-6514-1-git-send-email-feij.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00599.txt.bz2 *test break at offset -1 *test break with address *test break with non-existed address *test break with non-existed condition --- gdb/testsuite/gdb.base/break.exp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp index f879bc8..3a997d1 100644 --- a/gdb/testsuite/gdb.base/break.exp +++ b/gdb/testsuite/gdb.base/break.exp @@ -399,6 +399,10 @@ set bp_location10 [gdb_get_line_number "set breakpoint 10 here"] gdb_test "break +1" \ "Breakpoint.*at.* file .*$srcfile, line $bp_location10\\." \ "breakpoint offset +1" +#Test break at offset -1 +gdb_test "break -1" \ + "Note: breakpoint 6 also set at.*Breakpoint.*at.* file .*$srcfile, line.*" \ + "breakpoint offset -1" # Check to see if breakpoint is hit when stepped onto @@ -940,3 +944,17 @@ gdb_test_no_output "set \$foo=81.5" \ gdb_test "break $srcfile:\$foo" \ "Convenience variables used in line specs must have integer values.*" \ "set breakpoint via non-integer convenience variable disallowed" + +#Test break with address +gdb_test "break *0x400795" \ + "Breakpoint.*at.* .*$srcfile, line.*" \ + "breakpoint with address" + +#Test break with non-existed address +gdb_test "break *0xfffffffffffffffff" \ + "Numeric constant too large\." \ + "breakpoint with non-existed address" + +#Test break with non-existed condition +gdb_test "break 50 if i<0" \ + "No symbol \"i\" in current context\." -- 1.8.3.1