This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Print trace state variables
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>, Stan Shebs <stan at codesourcery dot com>
- Date: Mon, 13 Dec 2010 13:00:40 +0000
- Subject: Re: [PATCH] Print trace state variables
- References: <4D015A4A.7040500@codesourcery.com> <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