From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29258 invoked by alias); 8 Oct 2013 11:48:46 -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 29126 invoked by uid 89); 8 Oct 2013 11:48:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 08 Oct 2013 11:48:45 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id BFB2F1165DD for ; Tue, 8 Oct 2013 07:49:03 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 87SpeaUbDu8Y for ; Tue, 8 Oct 2013 07:49:03 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 581801165AF for ; Tue, 8 Oct 2013 07:49:03 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id AB95FE105A; Tue, 8 Oct 2013 15:48:39 +0400 (RET) From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [RFA/commit 4/4] Adjust gdb.ada/mi_catch_ex.exp to use GDB/MI catch commands... Date: Tue, 08 Oct 2013 11:48:00 -0000 Message-Id: <1381232908-5868-5-git-send-email-brobecker@adacore.com> In-Reply-To: <1381232908-5868-1-git-send-email-brobecker@adacore.com> References: <1381232908-5868-1-git-send-email-brobecker@adacore.com> X-SW-Source: 2013-10/txt/msg00214.txt.bz2 ... in place of the CLI "catch ..." commands. The latter were used because the GDB/MI equivalents were not available at the time. gdb/testsuite/ChangeLog: * gdb.ada/mi_catch_ex.exp: Adjusts all "catch ..." tests to use the appropriate GDB/MI command instead, and verify the test output. Tested on x86_64-linux. It's sufficiently straightforward that I'm tempted to call it obvious. Hence the "commit" in "RFA/commit". -- Joel --- gdb/testsuite/gdb.ada/mi_catch_ex.exp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex.exp b/gdb/testsuite/gdb.ada/mi_catch_ex.exp index d30d44b..f26fcdf 100644 --- a/gdb/testsuite/gdb.ada/mi_catch_ex.exp +++ b/gdb/testsuite/gdb.ada/mi_catch_ex.exp @@ -74,7 +74,9 @@ if ![mi_run_to_main] then { return 0 } -mi_gdb_test "catch exception" +mi_gdb_test "-catch-exception" \ + "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"all Ada exceptions\",.*}" \ + "catch all exceptions" mi_execute_to "exec-continue" \ "breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"CONSTRAINT_ERROR" \ @@ -107,11 +109,17 @@ if ![mi_run_to_main] then { return 0 } -mi_gdb_test "catch exception Program_Error" +mi_gdb_test "-catch-exception -e Program_Error" \ + "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"`Program_Error' Ada exception\",.*}" \ + "catch Program_Error" -mi_gdb_test "catch assert" +mi_gdb_test "-catch-assert" \ + "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"failed Ada assertions\",.*}" \ + "catch assert failures" -mi_gdb_test "catch exception unhandled" +mi_gdb_test "-catch-exception -u" \ + "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"unhandled Ada exceptions\",.*}" \ + "catch unhandled exceptions" mi_execute_to "exec-continue" \ "breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"PROGRAM_ERROR" \ -- 1.8.1.2