Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Stan Shebs <stan@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Print trace state variables
Date: Tue, 14 Dec 2010 16:13:00 -0000	[thread overview]
Message-ID: <m3r5dks57p.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20101211055510.GE2596@adacore.com> (Joel Brobecker's message of	"Sat, 11 Dec 2010 09:55:10 +0400")

>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

Joel> I think a cleaner way of doing this would be to create a new OP_ enum
Joel> for tracepoint variables.  We'd then add handling for it in
Joel> write_dollar_variable, as well as in the expression evaluator.

FWIW, I mildly prefer the current approach.  Using a new OP_ means that
the variable is fixed at expression-parse time; but there doesn't seem
to be a compelling need to make this limitation.  In fact, it seems like
it could be confusing... breakpoint conditions entered at different
times would refer to different variables (some hidden!), or re-parsing
an expression might resolve the variable differently.

Joel> Another potential issue to consider is precedence: If the user had
Joel> already defined an internal variable called "VAR", and then creates
Joel> a tracepoint variable with the same name, which one should we print
Joel> when he write "$VAR"? With your proposal, the tracepoint variable
Joel> hides the internal variable, right?

The docs say:

    Trace state variables share the same
    namespace as other "$" variables, which means that you cannot have
    trace state variables with names like `$23' or `$pc', nor can you have
    a trace state variable and a convenience variable with the same name.

Maybe this could be enforced?  Or is that not possible?

Tom


  parent reply	other threads:[~2010-12-14 16:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 22:38 Stan Shebs
2010-12-10 11:27 ` Joel Brobecker
2010-12-10 14:04   ` Stan Shebs
2010-12-10 16:35   ` Marc Khouzam
2010-12-10 20:00     ` Tom Tromey
2010-12-11  5:28       ` Joel Brobecker
2010-12-11  5:55 ` Joel Brobecker
2010-12-13  5:56   ` Stan Shebs
2010-12-13 13:00   ` Pedro Alves
2010-12-14 16:13   ` Tom Tromey [this message]
2010-12-13 12:31 ` Hui Zhu

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=m3r5dks57p.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=stan@codesourcery.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