From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24832 invoked by alias); 6 Dec 2011 17:19:11 -0000 Received: (qmail 24823 invoked by uid 22791); 6 Dec 2011 17:19:09 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,FROM_12LTRDOM 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; Tue, 06 Dec 2011 17:18:55 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RXyfN-0004Cy-Or from pedro_alves@mentor.com ; Tue, 06 Dec 2011 09:18:53 -0800 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 6 Dec 2011 17:18:51 +0000 Subject: [PATCH] gdb.ada/catch_ex.exp, gdb.ada/mi_catch_ex.exp and unsupported catchpoints To: gdb-patches@sourceware.org From: Pedro Alves Cc: Joel Brobecker Date: Tue, 06 Dec 2011 17:33:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201112061718.50031.pedro@codesourcery.com> 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: 2011-12/txt/msg00182.txt.bz2 Hi! I get a bunch of cascading failures on gdb.ada/catch_ex.exp and gdb.ada/mi_catch_ex.exp. These annoy me because the set of FAILs and timeouts is different in sync vs async. :-) But that's actually irrelevant. The relevant bit of gdb.sum: Running ../../../gdb/gdb/testsuite/gdb.ada/catch_ex.exp ... FAIL: gdb.ada/catch_ex.exp: insert catchpoint on all Ada exceptions FAIL: gdb.ada/catch_ex.exp: info break, catch all Ada exceptions FAIL: gdb.ada/catch_ex.exp: continuing to first exception (the program exited) FAIL: gdb.ada/catch_ex.exp: continuing to second exception (the program is no longer running) FAIL: gdb.ada/catch_ex.exp: insert catchpoint on Program_Error FAIL: gdb.ada/catch_ex.exp: insert catchpoint on failed assertions FAIL: gdb.ada/catch_ex.exp: insert catchpoint on unhandled exceptions FAIL: gdb.ada/catch_ex.exp: info break, second run FAIL: gdb.ada/catch_ex.exp: continuing to Program_Error exception (the program exited) FAIL: gdb.ada/catch_ex.exp: continuing to failed assertion (the program is no longer running) FAIL: gdb.ada/catch_ex.exp: continuing to unhandled exception (the program is no longer running) FAIL: gdb.ada/catch_ex.exp: continuing to program completion (the program is no longer running) FAIL: gdb.ada/catch_ex.exp: tcatch exception FAIL: gdb.ada/catch_ex.exp: continuing to temporary catchpoint (the program exited) FAIL: gdb.ada/catch_ex.exp: continuing to program completion (the program is no longer running) Running ../../../gdb/gdb/testsuite/gdb.ada/mi_catch_ex.exp ... FAIL: gdb.ada/mi_catch_ex.exp: insert catchpoint on all Ada exceptions FAIL: gdb.ada/mi_catch_ex.exp: continue to exception catchpoint hit (unknown output after running) FAIL: gdb.ada/mi_catch_ex.exp: continue to exception catchpoint hit (MI error) FAIL: gdb.ada/mi_catch_ex.exp: continue to exception catchpoint hit (timeout) FAIL: gdb.ada/mi_catch_ex.exp: continue to exception catchpoint hit (unknown output after running) FAIL: gdb.ada/mi_catch_ex.exp: continue to exception catchpoint hit (MI error) FAIL: gdb.ada/mi_catch_ex.exp: continue to exception catchpoint hit (timeout) FAIL: gdb.ada/mi_catch_ex.exp: continue to exception catchpoint hit (MI error) FAIL: gdb.ada/mi_catch_ex.exp: continue to exception catchpoint hit (timeout) And the gdb.log shows: (gdb) catch exception Cannot insert catchpoints in this configuration. (gdb) FAIL: gdb.ada/catch_ex.exp: insert catchpoint on all Ada exceptions ... So it looks like I just don't have debug info for the runtime on this machine. The tests in question already try to detect the case: -re "Cannot break on __gnat_raise_nodefer_with_msg in this configuration\.$eol$gdb_prompt $" { # If the runtime was not built with enough debug information, # or if it was stripped, we can not test exception # catchpoints. unsupported $msg return -1 } but they don't match this specific error message. I can't seem to find the "Cannot break on" string anywhere, is it escaping me? The patch below makes the test accept both variants. Should we keep the new form only instead? (BTW, the "cannot insert catchpoints" error may be a bit confusing, considering there are other non-Ada catchpoints that will work just fine.) gdb/testsuite/ 2011-12-06 Pedro Alves * gdb.ada/catch_ex.exp: Skip as unsupported if "catch exception" throws "Cannot insert catchpoints in this configuration". * gdb.ada/mi_catch_ex.exp: Likewise. With the patch I now get: Running ../../../gdb/gdb/testsuite/gdb.ada/catch_ex.exp ... Running ../../../gdb/gdb/testsuite/gdb.ada/mi_catch_ex.exp ... === gdb Summary === # of expected passes 2 # of unsupported tests 2 Okay? --- gdb/testsuite/gdb.ada/catch_ex.exp | 2 +- gdb/testsuite/gdb.ada/mi_catch_ex.exp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.ada/catch_ex.exp b/gdb/testsuite/gdb.ada/catch_ex.exp index fa458d8..0ea3256 100644 --- a/gdb/testsuite/gdb.ada/catch_ex.exp +++ b/gdb/testsuite/gdb.ada/catch_ex.exp @@ -56,7 +56,7 @@ gdb_test_multiple "catch exception" $msg { -re "Catchpoint $any_nb: all Ada exceptions$eol$gdb_prompt $" { pass $msg } - -re "Cannot break on __gnat_raise_nodefer_with_msg in this configuration\.$eol$gdb_prompt $" { + -re "Cannot (insert catchpoints|break on __gnat_raise_nodefer_with_msg) in this configuration\.$eol$gdb_prompt $" { # If the runtime was not built with enough debug information, # or if it was stripped, we can not test exception # catchpoints. diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex.exp b/gdb/testsuite/gdb.ada/mi_catch_ex.exp index dadc574..4be1cad 100644 --- a/gdb/testsuite/gdb.ada/mi_catch_ex.exp +++ b/gdb/testsuite/gdb.ada/mi_catch_ex.exp @@ -46,7 +46,7 @@ gdb_test_multiple "catch exception" $msg { -re "Catchpoint $any_nb: all Ada exceptions$eol$gdb_prompt $" { pass $msg } - -re "Cannot break on __gnat_raise_nodefer_with_msg in this configuration\.\[\r\n\]+$gdb_prompt $" { + -re "Cannot (insert catchpoints|break on __gnat_raise_nodefer_with_msg) in this configuration\.\[\r\n\]+$gdb_prompt $" { # If the runtime was not built with enough debug information, # or if it was stripped, we can not test exception # catchpoints.