From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1337 invoked by alias); 28 Feb 2013 13:17:14 -0000 Received: (qmail 1271 invoked by uid 22791); 28 Feb 2013 13:17:13 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Feb 2013 13:17:02 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1UB3M5-0007mp-Ql from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Thu, 28 Feb 2013 05:17:01 -0800 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 28 Feb 2013 05:17:01 -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.1.289.1; Thu, 28 Feb 2013 05:17:01 -0800 From: Yao Qi To: Subject: [PATCH 4/4] Test case on setting dprintf commands. Date: Thu, 28 Feb 2013 14:48:00 -0000 Message-ID: <1362057362-25324-4-git-send-email-yao@codesourcery.com> In-Reply-To: <1362057362-25324-1-git-send-email-yao@codesourcery.com> References: <1361192891-29341-1-git-send-email-yao@codesourcery.com> <1362057362-25324-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain 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: 2013-02/txt/msg00737.txt.bz2 Test that GDB doesn't allow setting commands for dprintf breakpoint. gdb/testsuite: 2013-02-28 Yao Qi * gdb.base/dprintf.exp: Test commands are not allowed to set for dprintf breakpoint. --- gdb/testsuite/gdb.base/dprintf.exp | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/gdb/testsuite/gdb.base/dprintf.exp b/gdb/testsuite/gdb.base/dprintf.exp index 22c740a..aa0108d 100644 --- a/gdb/testsuite/gdb.base/dprintf.exp +++ b/gdb/testsuite/gdb.base/dprintf.exp @@ -40,6 +40,20 @@ gdb_breakpoint "main" gdb_test "dprintf foo,\"At foo entry\\n\"" \ "Dprintf .*" +# Test that GDB doesn't allow setting commands for dprintf. +set test "set commands for dprintf" +gdb_test_multiple "commands \$bpnum" "${test}" { + -re "End with a line saying just \"end\".*>" { + send_gdb "silent\n" + send_gdb "end\n" + + fail $test + } + -re "Setting commands for dprintf breakpoint is not allowed.*\r\n$gdb_prompt $" { + pass $test + } +} + # Set two dprintf breakpoints at the same location. gdb_test "dprintf $dp_location1,\"arg=%d, g=%d\\n\", arg, g" \ "Dprintf .*" -- 1.7.7.6