any expression to tell whether a variable was optimized out?

Tom Tromey tromey@redhat.com
Tue Mar 17 21:07:00 GMT 2009


>>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:

Thiago> You can also do the above by checking out the archer-tromey-python
Thiago> branch, and applying the patch below. I didn't commit this yet because I
Thiago> don't know if it would be better to have is_optimized_out function as a
Thiago> method or attribute of gdb.Value...

I think attribute, because (AFAIK) it is immutable.

I'm a little surprised that this is an attribute of values at all.
Doesn't that seem weird?  Is there anything useful that can be done
with a value like this?  Perhaps just fetching its type?

Tom



More information about the Gdb mailing list