Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC 11/12] entryval: "@entry" in input expressions
Date: Tue, 19 Jul 2011 16:26:00 -0000	[thread overview]
Message-ID: <m3tyai450c.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20110718202410.GL30496@host1.jankratochvil.net> (Jan	Kratochvil's message of "Mon, 18 Jul 2011 22:24:10 +0200")

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> 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


  parent reply	other threads:[~2011-07-19 16:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18 20:56 Jan Kratochvil
2011-07-19 11:14 ` Eli Zaretskii
2011-07-19 16:38   ` Tom Tromey
2011-07-29 16:17   ` Jan Kratochvil
2011-07-19 16:26 ` Tom Tromey [this message]
2011-07-25 19:00   ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3tyai450c.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox