From patchwork Fri Sep 25 01:29:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 8847 Received: (qmail 59242 invoked by alias); 25 Sep 2015 01:30:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 59229 invoked by uid 89); 25 Sep 2015 01:30:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS 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, 25 Sep 2015 01:30:08 +0000 Received: from svr-orw-fem-02x.mgc.mentorg.com ([147.34.96.206] helo=SVR-ORW-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1ZfHpt-0003p8-45 from Sandra_Loosemore@mentor.com for gdb-patches@sourceware.org; Thu, 24 Sep 2015 18:30:05 -0700 Received: from [IPv6:::1] (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.3.224.2; Thu, 24 Sep 2015 18:30:04 -0700 Message-ID: <5604A368.8090905@codesourcery.com> Date: Thu, 24 Sep 2015 19:29:12 -0600 From: Sandra Loosemore User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: gdb-patches Subject: [committed, testsuite] generalize enum regexp in gdb.cp/classes.exp This patch is very similar to the patch I pushed yesterday for gdb.cp/var-tag.exp: https://sourceware.org/ml/gdb-patches/2015-09/msg00555.html I found another instance in gdb.cp/classes.exp where the regexp had a hard-coded assumption that enum types are int-sized. This patch fixes the failure on arm-none-eabi, where GCC defaults to -fshort-enums as permitted by both the C++ standard and the AAPCS. I've checked it in as obvious after verifying it works. -Sandra diff --git a/gdb/testsuite/gdb.cp/classes.exp b/gdb/testsuite/gdb.cp/classes.exp index 1d714d3..00f16fc 100644 --- a/gdb/testsuite/gdb.cp/classes.exp +++ b/gdb/testsuite/gdb.cp/classes.exp @@ -419,7 +419,7 @@ proc test_enums {} { # ptype on the enum member gdb_test_multiple "ptype obj_with_enum.priv_enum" "ptype obj_with_enum.priv_enum" { - -re "type = enum ClassWithEnum::PrivEnum (: unsigned int )?\{ ?(ClassWithEnum::)?red, (ClassWithEnum::)?green, (ClassWithEnum::)?blue, (ClassWithEnum::)?yellow = 42 ?\}$nl$gdb_prompt $" { + -re "type = enum ClassWithEnum::PrivEnum (: unsigned (int|short|char) )?\{ ?(ClassWithEnum::)?red, (ClassWithEnum::)?green, (ClassWithEnum::)?blue, (ClassWithEnum::)?yellow = 42 ?\}$nl$gdb_prompt $" { pass "ptype obj_with_enum.priv_enum" } -re "type = enum PrivEnum \{ ?(ClassWithEnum::)?red, (ClassWithEnum::)?green, (ClassWithEnum::)?blue, (ClassWithEnum::)?yellow = 42 ?\}$nl$gdb_prompt $" {