This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

python: get string of gdb.value


Hi all,

I have a gdb.value object, which is of a type my_enum_type_t and holds a value of 'ONE' which is int 6.

if I write 
print var
the output is 'ONE'
bit if I try to do:

if var == 'ONE':

I run into errors:
 RuntimeError: Trying to read string with inappropriate type

How can I get the string from a gdb.value.

the 
var.string()

method is NOT! working, the result is the same error as above.

Any hints?

Regards
 Klaus
-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!			
Jetzt informieren: http://www.gmx.net/de/go/freephone


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]