From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13682 invoked by alias); 19 Jul 2011 16:20:08 -0000 Received: (qmail 13613 invoked by uid 22791); 19 Jul 2011 16:20:04 -0000 X-SWARE-Spam-Status: No, hits=-7.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 Jul 2011 16:19:49 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6JGJmqa000889 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 19 Jul 2011 12:19:48 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p6JGJmLK023390; Tue, 19 Jul 2011 12:19:48 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p6JGJlEA006622; Tue, 19 Jul 2011 12:19:47 -0400 From: Tom Tromey To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [RFC 11/12] entryval: "@entry" in input expressions References: <20110718202410.GL30496@host1.jankratochvil.net> Date: Tue, 19 Jul 2011 16:26:00 -0000 In-Reply-To: <20110718202410.GL30496@host1.jankratochvil.net> (Jan Kratochvil's message of "Mon, 18 Jul 2011 22:24:10 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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-07/txt/msg00473.txt.bz2 >>>>> "Jan" == Jan Kratochvil writes: Jan> it would be good if one can also: Jan> (gdb) print refparam@entry Jan> $1 = 5 Jan> I am not sure if the entry values should be really indicated by the @entry Jan> suffix. Also as @entry values are not not_lval it may be enough to display Jan> them either by `bt full' and `info args' or even by some new command: Jan> (gdb) entryval param Jan> #1 = 5 It is better for it to be part of expression parsing, because then the values can be easily used in breakpoint conditions. Jan> Also the @entry means the `@' operator and "entry" identifier to be Jan> overloaded. This way each supported GDB language needs its own *.y Jan> patch. I will implement some others - specifically Fortran - if Jan> this syntax gets agreed upon. It means that formerly valid @entry Jan> meant repeat left expression by the number of times stored in a Jan> variable named `entry' changes meaning but I do not think it is a Jan> problem. I think this approach is ok. There is already a special case for address spaces in c-exp.y. Jan> There is some risk of a clash with Koening operator parsing but I Jan> do not think this patch has any problem with it. If you are referring to the use of "@" in comments in the Koening code, that is a placeholder for a generic operator (IIRC the C++ standard uses this convention); there is no C++ operator actually named "@". So, there is no risk of clash here. Tom