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]

RE: Some Python ideas, looking for feedback


>On Tuesday 16 August 2011 13:03:42 ext Paul_Koning@Dell.com wrote:
>> [...]
>> And a question: is there a way to get the value corresponding to an enum type's value name?  
>> The name comes back in the fields() output but I don't see how I would get the value.  Could that be made a value attribute of the field object?
>
>int(...) works, or "%d" % ...

That works for Value objects, but not for fields of Type.  But it looks like an obvious way to make it work for Type (rather than a "value" attribute as I suggested earlier).

	paul


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