From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71477 invoked by alias); 18 Dec 2018 22:40:27 -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 71338 invoked by uid 89); 18 Dec 2018 22:40:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=focusing, D*ca, H*RU:sk:host86-, Hx-spam-relays-external:sk:host86- X-HELO: mail-wr1-f47.google.com Received: from mail-wr1-f47.google.com (HELO mail-wr1-f47.google.com) (209.85.221.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Dec 2018 22:40:23 +0000 Received: by mail-wr1-f47.google.com with SMTP id 96so17589303wrb.2 for ; Tue, 18 Dec 2018 14:40:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Tur5jb1jODQ+P19V9RObx9gftibuNKyRA44+fkbv2WA=; b=Yob5EtD7nftRxQBNn0u1YI6BV2XA0XdkF5/7DqFnI5XLA+gAaWjrpNNF29ZASmrmUg 4SII3LNgq2VqRJLSorG3E0sKdarkT9ij9KBJE8iUDElNLzeTJ8duxKlfjKdha64d/PyR 3c7edBylcsrrTRLfEiFVyVyxnsy6rK3AQgEYcHw9sxaE6Mf+imRqjRjcQ+ozx30X0SmQ iP4acKOKXmojw6iJ9ajYZaxziLoLiAEQjewGQu6canSUbq5H4TuVDK5q9t63GN4bCefU rPy+YCnW6hHWd3R4dJq4qtGfuulZFnerpKNW6QJ0ATetVYpEKDwPM1j4n8j7/4T1DXSE ha/A== Return-Path: Received: from localhost (host86-156-236-210.range86-156.btcentralplus.com. [86.156.236.210]) by smtp.gmail.com with ESMTPSA id x12sm2201083wmc.37.2018.12.18.14.40.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Dec 2018 14:40:20 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Tom Tromey , Simon Marchi , jimw@sifive.com, jhb@FreeBSD.org, palmer@sifive.com, Andrew Burgess Subject: [PATCHv2 0/4] gdb: Allow struct fields named double Date: Tue, 18 Dec 2018 22:40:00 -0000 Message-Id: In-Reply-To: <87tvjd4e54.fsf@tromey.com> References: <87tvjd4e54.fsf@tromey.com> X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00210.txt.bz2 Simon, Tom, Thanks for the feedback. * Tom Tromey [2018-12-16 09:42:15 -0700]: > >>>>> "Simon" == Simon Marchi writes: > > Simon> This looks reasonable to me, from the user point of view there is not reason > Simon> why x.double would be different from x.float. With the same logic, we should > Simon> also allow x.int, x.short, etc. But I'm fine with doing it on an as-needed basis. > > See also https://sourceware.org/bugzilla/show_bug.cgi?id=13368 The new patch series includes a patch that extends some of the comments in order to hopefully address this bug. > > Simon> This LGTM, with one thing below you might want to change. I'm far from an expert > Simon> in parsers though, so please give others ~1 week to comment, and push then if you > Simon> don't receive additional feedback. > > I think the main possible issue is if this introduces a new parser conflict. > Taking a glance at the uses of "name" in the grammar, though, it seems > safe enough. I took a better look at how the YACC step of the compile works, and it turns out that parser conflicts are not fatal to the build, and my change had introduced a new conflict. The new patch series addresses this by focusing my change specifically on structure field names, so I want to be able to parse: 'object.double', but I don't expect to be able to parse an object named 'double'. I also extended my patch to cover other types like 'int', 'short', etc. As penance I've included a patch that tweaks how pointers are parsed that resolves 49 reduce/reduce conflicts. After this series there's still 42 shift/reduce conflicts, and 4 reduce/reduce conflicts in the C parser, but patch #4, the one I really care about, doesn't introduce any new conflicts. Tested on X86-64 GNU/Linux. Thanks, Andrew --- Andrew Burgess (4): gdb: Extend the comments in c-exp.y gdb: Resolve 49 reduce/reduce conflicts in c-exp.y gdb: Add new parser rule for structure field names gdb: Allow struct fields named double gdb/ChangeLog | 24 ++++ gdb/c-exp.y | 73 +++++++++--- gdb/testsuite/ChangeLog | 5 + gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.c | 32 +++++ .../gdb.dwarf2/dw2-unusual-field-names.exp | 132 +++++++++++++++++++++ 5 files changed, 248 insertions(+), 18 deletions(-) create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.c create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp -- 2.14.5