From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113882 invoked by alias); 21 Dec 2018 17:19:48 -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 113814 invoked by uid 89); 21 Dec 2018 17:19:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=tokens X-HELO: gateway23.websitewelcome.com Received: from gateway23.websitewelcome.com (HELO gateway23.websitewelcome.com) (192.185.48.104) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Dec 2018 17:19:44 +0000 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway23.websitewelcome.com (Postfix) with ESMTP id BE1FE1A72E for ; Fri, 21 Dec 2018 11:19:42 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id aOScg9qFN4FKpaOScgesBs; Fri, 21 Dec 2018 11:19:42 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3m0KUVjTmCe1GLNxzImpCAS7Ko0Mu96DljJYPqBkE/Y=; b=hLOodLKbh9rmjg9gvuiwI3Fvj6 oSxLvP7EzqAGykvJfInwURjxUA2xb28fpNuJH6Qr4G3VaqPqdEQiuKyY9EcYStu7rwLDGD+1Vepny y3SCQYdNPpScU0R3SxQvxHvCJ; Received: from 75-166-72-210.hlrn.qwest.net ([75.166.72.210]:58340 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gaOSc-0034if-Dz; Fri, 21 Dec 2018 11:19:42 -0600 From: Tom Tromey To: Andrew Burgess Cc: gdb-patches@sourceware.org, Tom Tromey , Simon Marchi , jimw@sifive.com, jhb@FreeBSD.org, palmer@sifive.com Subject: Re: [PATCHv2 4/4] gdb: Allow struct fields named double References: <41fdb503cf18c86986aaf70dd2387c42f52502ee.1545172667.git.andrew.burgess@embecosm.com> Date: Fri, 21 Dec 2018 17:19:00 -0000 In-Reply-To: <41fdb503cf18c86986aaf70dd2387c42f52502ee.1545172667.git.andrew.burgess@embecosm.com> (Andrew Burgess's message of "Tue, 18 Dec 2018 22:40:13 +0000") Message-ID: <87efaasspe.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-12/txt/msg00252.txt.bz2 >>>>> "Andrew" == Andrew Burgess writes: Andrew> gdb/ChangeLog: Andrew> * c-exp.y (field_name): Allow DOUBLE_KEYWORD, INT_KEYWORD, LONG, Andrew> SHORT, SIGNED_KEYWORD, and UNSIGNED tokens to act as a field Andrew> names. Andrew> (typename_stoken): New function. Andrew> gdb/testsuite/ChangeLog: Andrew> * gdb.dwarf2/dw2-unusual-field-names.c: New file. Andrew> * gdb.dwarf2/dw2-unusual-field-names.exp: New file. Thanks for doing this. This is ok. I wanted to mention that I think it's a good idea to do this because the C language also serves as a fallback either when language support isn't available or when one wants to inspect things in a low-level way, and in this case it can be useful to have some extensions to C. Andrew> +foreach field_name { double float char byte long int short unsigned signed } { Andrew> + run_test $field_name Andrew> +} I'd like to verify that there aren't any duplicate test names resulting from this approach. If there aren't, this is fine; if there are, I think run_test could be wrapped in a with_test_prefix. thanks, Tom