Re: [PATCH] Print trace state variables

Pedro Alves
2010-12-13T13:00:52Z

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