Message ID | 55AD0A6E.6060604@adacore.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 109202 invoked by alias); 20 Jul 2015 14:49:23 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 109192 invoked by uid 89); 20 Jul 2015 14:49:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 20 Jul 2015 14:49:21 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 8008528B2C55; Mon, 20 Jul 2015 16:49:18 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D5BzYUTFicZb; Mon, 20 Jul 2015 16:49:18 +0200 (CEST) Received: from [10.10.1.112] (cacatoes.act-europe.fr [10.10.1.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 46C5528B1DDF; Mon, 20 Jul 2015 16:49:18 +0200 (CEST) Subject: Re: [PATCH] Share the "multi_line" helper among all Ada testcases To: Sergio Durigan Junior <sergiodj@redhat.com> References: <54FEDB92.9060808@adacore.com> <20150317200809.GD7494@adacore.com> <5509492C.5000604@redhat.com> <20150318141238.GE7494@adacore.com> <550C100D.5000500@adacore.com> <87oajas3pb.fsf@redhat.com> Cc: Joel Brobecker <brobecker@adacore.com>, Pedro Alves <palves@redhat.com>, GDB Patches <gdb-patches@sourceware.org> From: Pierre-Marie de Rodat <derodat@adacore.com> Message-ID: <55AD0A6E.6060604@adacore.com> Date: Mon, 20 Jul 2015 16:49:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <87oajas3pb.fsf@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes |
Commit Message
Pierre-Marie de Rodat
July 20, 2015, 2:49 p.m. UTC
Sergio, On 07/18/2015 02:35 AM, Sergio Durigan Junior wrote: > Hmm, I am seeing a regression on gdb.ada/info_exc.exp because of this > patch. Because of the way multi_line was rewritten it is not possibe > anymore to mean "anything" again; it will always be at least a newline > (\r\n). > > I've rewritten the test to expect the exact output from "info > exceptions" (i.e., removing the ".*" parts), but I am not sure this is > the right thing to do. Joel/Pierre? Thank you for the heads-up! I did not notice this when submitting the patch... Anyway, I had a look at what commit introduced the ".*" parts: commit 391d3400084c6a2d805cd0efd925f29347fa7a18 Author: Joel Brobecker <brobecker@adacore.com> Date: Fri Nov 15 20:34:09 2013 +0400 gdb.ada/info_exc.exp,mi_exc_info.exp: handle runtimes with full debug info. If the runtime has full debug info, then the non-standard exceptions declared in the GNAT runtime will appear in the list of exceptions printed by GDB ("info exceptions" or "-info-ada-exceptions"). This is valid output, so this patch allows for it. So it looks like they are needed for some configuration. Then, what about this: \"task\":" \
Comments
Hey Pierre, On Monday, July 20 2015, Pierre-Marie de Rodat wrote: > On 07/18/2015 02:35 AM, Sergio Durigan Junior wrote: >> Hmm, I am seeing a regression on gdb.ada/info_exc.exp because of this >> patch. Because of the way multi_line was rewritten it is not possibe >> anymore to mean "anything" again; it will always be at least a newline >> (\r\n). >> >> I've rewritten the test to expect the exact output from "info >> exceptions" (i.e., removing the ".*" parts), but I am not sure this is >> the right thing to do. Joel/Pierre? > > Thank you for the heads-up! I did not notice this when submitting the > patch... Anyway, I had a look at what commit introduced the ".*" > parts: > > commit 391d3400084c6a2d805cd0efd925f29347fa7a18 > Author: Joel Brobecker <brobecker@adacore.com> > Date: Fri Nov 15 20:34:09 2013 +0400 > > gdb.ada/info_exc.exp,mi_exc_info.exp: handle runtimes with full > debug info. > > If the runtime has full debug info, then the non-standard exceptions > declared in the GNAT runtime will appear in the list of exceptions > printed by GDB ("info exceptions" or "-info-ada-exceptions"). > This is valid output, so this patch allows for it. > > So it looks like they are needed for some configuration. Then, what > about this: Hm, right, thanks for checking this. I suspected that the ".*" had a reason to exist... > diff --git a/gdb/testsuite/gdb.ada/info_exc.exp > b/gdb/testsuite/gdb.ada/info_exc.exp > index add83c5..448882b 100644 > --- a/gdb/testsuite/gdb.ada/info_exc.exp > +++ b/gdb/testsuite/gdb.ada/info_exc.exp > @@ -34,9 +34,7 @@ gdb_test "info exceptions" \ > "program_error: $hex" \ > "storage_error: $hex" \ > "tasking_error: $hex" \ > - ".*" \ > - "const.aint_global_gdb_e: $hex" \ > - ".*"] > + "\(.*\r\n\)*const.aint_global_gdb_e: $hex\(.*\r\n\)*"] > > gdb_test "info exceptions task" \ > [multi_line "All Ada exceptions matching regular expression > \"task\":" \ The patch looks good to me and works fine here (though I haven't tested the case when the output contains more lines than expected). I'm not a maintainer of this area, so I cannot really approve this. Thanks!
diff --git a/gdb/testsuite/gdb.ada/info_exc.exp b/gdb/testsuite/gdb.ada/info_exc.exp index add83c5..448882b 100644 --- a/gdb/testsuite/gdb.ada/info_exc.exp +++ b/gdb/testsuite/gdb.ada/info_exc.exp @@ -34,9 +34,7 @@ gdb_test "info exceptions" \ "program_error: $hex" \ "storage_error: $hex" \ "tasking_error: $hex" \ - ".*" \ - "const.aint_global_gdb_e: $hex" \ - ".*"] + "\(.*\r\n\)*const.aint_global_gdb_e: $hex\(.*\r\n\)*"] gdb_test "info exceptions task" \ [multi_line "All Ada exceptions matching regular expression