This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: Some Python ideas, looking for feedback
- From: <Paul_Koning at Dell dot com>
- To: <drow at false dot org>, <andrew at ado dot is-a-geek dot net>
- Cc: <gdb-patches at sourceware dot org>, <gdb at sourceware dot org>
- Date: Wed, 17 Aug 2011 16:15:20 -0500
- Subject: RE: Some Python ideas, looking for feedback
- References: <09787EF419216C41A903FD14EE5506DD0151D583A2@AUSX7MCPC103.AMER.DELL.COM> <201108161345.33448.andre.poenitz@nokia.com> <09787EF419216C41A903FD14EE5506DD0151D585D2@AUSX7MCPC103.AMER.DELL.COM> <20110817193710.59945561@ado-gentoo> <20110817201316.64fc14e5@ado-gentoo> <CAN9gPaFPhVYmfUO0sZeMUUy0X7x+hyUd8wDFJZXbe98RVvTLSw@mail.gmail.com>
>> On Wed, 17 Aug 2011 19:37:10 +0100
>> Andrew Oakley <andrew@ado.is-a-geek.net> wrote:
>>> What you are looking for is (for some reason) stored in bitpos. ?I
>>> can't actually find any documentation for this :(.
>>
>> Perhaps we should fix that:
>>
>> Document gdb.Value field attribute "bitpos" for enums.
>
>I don't suppose we can avoid exposing this internal C wart to Python, and expose it some other way... ?
Clearly we could. For example, André suggested using the int() function on the field object, by analogy to what int() does to an enum-valued Value object. That certainly would make sense and it would be a pretty natural Pythonic thing to do.
paul