This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
python: get string of gdb.value
- From: "Klaus Rudolph" <lts-rudolph at gmx dot de>
- To: gdb at sourceware dot org
- Date: Fri, 06 May 2011 17:04:53 +0200
- Subject: 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