This is the mail archive of the gdb-patches@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 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


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