Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Joel Brobecker <brobecker@adacore.com>,
	Stan Shebs <stan@codesourcery.com>
Subject: Re: [PATCH] Print trace state variables
Date: Mon, 13 Dec 2010 13:00:00 -0000	[thread overview]
Message-ID: <201012131300.42962.pedro@codesourcery.com> (raw)
In-Reply-To: <20101211055510.GE2596@adacore.com>

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

For the archives, I'd like to point out explicitly that 
there's some precedence for this with registers:

>./gdb 
(gdb) p $rax
$1 = void
(gdb) p $rax = 1
$2 = 1
(gdb) file gdb
Reading symbols from /home/pedro/gdb/baseline/build/gdb/gdb...done.
(gdb) p $rax 
No registers.
(gdb) start
Temporary breakpoint 1 at 0x4562f3: file ../../src/gdb/gdb.c, line 29.
Starting program: /home/pedro/gdb/baseline/build/gdb/gdb 
[Thread debugging using libthread_db enabled]

Temporary breakpoint 1, main (argc=
During symbol reading, incomplete CFI data; unspecified registers (e.g., rax) at 0x4562e8.
1, argv=0x7fffffffe108) at ../../src/gdb/gdb.c:29
29        memset (&args, 0, sizeof args);
(gdb) p $rax 
$3 = 12108976

-- 
Pedro Alves


  parent reply	other threads:[~2010-12-13 13:00 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 [this message]
2010-12-14 16:13   ` Tom Tromey
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=201012131300.42962.pedro@codesourcery.com \
    --to=pedro@codesourcery.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