Some Python ideas, looking for feedback

Andrew Oakley
Wed Aug 17 19:13:00 GMT 2011

On Wed, 17 Aug 2011 19:37:10 +0100
Andrew Oakley <> 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.


diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 6e7bf52..c82173b 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -21575,7 +21575,8 @@ Each field is an object, with some pre-defined
attributes: @item bitpos
 This attribute is not available for @code{static} fields (as in
 C@t{++} or Java).  For non-@code{static} fields, the value is the bit
-position of the field.
+position of the field.  For @code{enum} fields, the value is the
enumeration +member's integer representation.

 @item name
 The name of the field, or @code{None} for anonymous fields.

Andrew Oakley

More information about the Gdb mailing list