From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29433 invoked by alias); 24 Jan 2014 07:48:39 -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 29424 invoked by uid 89); 24 Jan 2014 07:48:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 24 Jan 2014 07:48:37 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1W6bVC-0002Nt-D3 from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Thu, 23 Jan 2014 23:48:34 -0800 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 23 Jan 2014 23:48:34 -0800 Received: from qiyao.dyndns.org.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.2.247.3; Thu, 23 Jan 2014 23:47:06 -0800 From: Yao Qi To: Subject: [PATCH] Test no =breakpoint-modified is emitted for modifications from MI commands Date: Fri, 24 Jan 2014 07:48:00 -0000 Message-ID: <1390549587-23625-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00915.txt.bz2 As design, =breakpoint-modified isn't emitted when breakpoints are modified by MI commands. This patch is to add tests for this. gdb/testsuite: 2014-01-24 Yao Qi * gdb.mi/mi-breakpoint-changed.exp (test_insert_delete_modify): Test that no =breakpoint-modified is emitted when breakpoints are modified through MI commands. --- gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp index cb2f7f6..aa991cf 100644 --- a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp +++ b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp @@ -104,6 +104,9 @@ proc test_insert_delete_modify { } { mi_gdb_test $test \ {.*=breakpoint-modified,bkpt=\{number="2",.*,cond=\"main > 0x0\".*\}.*\n\^done} \ $test + # Modify condition through MI command shouldn't trigger MI notification. + mi_gdb_test "-break-condition 2 main == 0x0" "\\^done" \ + "-break-condition 2 main == 0x0" # 3. when modifying enableness set test "disable 3" @@ -114,16 +117,30 @@ proc test_insert_delete_modify { } { mi_gdb_test $test \ {.*=breakpoint-modified,bkpt=\{number="3",.*,enabled=\"y\".*\}.*\n\^done} \ $test + # Modify enableness through MI commands shouldn't trigger MI + # notification. + mi_gdb_test "-break-enable 3" "\\^done" "-break-enable 3" + mi_gdb_test "-break-disable 3" "\\^done" "-break-disable 3" + # 4. when modifying ignore count. set test "ignore 5 1" mi_gdb_test $test \ {.*=breakpoint-modified,bkpt=\{number="5",.*,ignore=\"1\".*\}.*\n\^done} \ $test + # Modify ignore count through MI command shouldn't trigger MI + # notification. + mi_gdb_test "-break-after 5 1" "\\^done" \ + "-break-after 5 1" + # 5. when modifying pass count. set test "passcount 1 4" mi_gdb_test $test \ {.*=breakpoint-modified,bkpt=\{number="4",.*pass="1".*\}.*\n\^done} \ $test + # Modify pass count through MI command shouldn't trigger MI + # notification. + mi_gdb_test "-break-passcount 4 1" "\\^done" \ + "-break-passcount 4 1" # Delete some breakpoints and verify that '=breakpoint-deleted # notification is correctly emitted. -- 1.7.7.6