PR 11067

Chris Moller cmoller@redhat.com
Wed Feb 3 21:52:00 GMT 2010


On 02/03/10 13:33, Tom Tromey wrote:
> Then how about http://sourceware.org/bugzilla/show_bug.cgi?id=11067 ?
> I just happened to run across this the other day; if it doesn't suit, I
> can dig through bugzilla and find something else.
>    

The enhancement req reads

> When I print a variable, printing the symbolic name for its value is right, but
> when I print the symbolic name, gdb should print its numeric value instead (or
> in addition).
>    

The simple fix is to always print both the symbolic name and the decimal 
value:

> (gdb) p e
> $1 = Val1 (= 56)
> (gdb) p Val1
> $2 = Val1 (= 56)
> (gdb)

That's a one-line change in c-valprint.c.  Trying to differentiate 
between those two cases looks like it would be significantly more difficult.

Would the one-line change do?  Or does the fix need to do exactly what 
the request says?

Chris

> Tom
>    



More information about the Archer mailing list