Fix gdb.Field attributes documentation for enum types.
authorJoel Brobecker <brobecker@adacore.com>
Mon, 23 Dec 2013 07:15:42 +0000 (11:15 +0400)
committerJoel Brobecker <brobecker@adacore.com>
Sat, 28 Dec 2013 03:19:07 +0000 (07:19 +0400)
The following patch ...

    | commit 14e75d8ea4fe9ed4dbf292ae4a9745e33e2ff353
    | Date:   Wed Apr 18 06:46:47 2012 +0000
    |
    |     gdb/
    |         PR symtab/7259:
    | [...]

... discussed under ...

    [PATCH] Allow 64-bit enum values
    http://www.sourceware.org/ml/gdb-patches/2012-03/msg00772.html

... introduced a change in the gdb.Fields API without documenting it:

    | I took a separate approach from the one I took in:
    |
    | http://sourceware.org/ml/gdb-patches/2012-02/msg00403.html
    |
    | and removed the overloaded meaning of the bitpos location variable to
    | fix PR symtab/7259. In the following patch, I introduce a separate
    | field_location union member 'enumval' which can accept LONGEST and
    | hence expand enum values to 64-bit signed values. With this change,
    | bitpos now only is used for (non-negative) offsets into structures,
    | since the other overload of bitpos (range bounds) were already
    | separated into struct range_bound.

This patch updates the documentation to reflect that change.

gdb/doc/ChangeLog:

        * gdb.texinfo (Types In Python): Fix the documentation of
        attribute "bitpos" in class gdb.Field for enum types.  Add
        documentation for attribute "enumval" in that same class.

gdb/doc/ChangeLog
gdb/doc/gdb.texinfo

index 5e446db6b5bc928b8dbca96d37d90ff09ce16f6f..0df308ddb0f7ddf5009e0e0d1cc4cc0e4a8cca01 100644 (file)
@@ -1,3 +1,9 @@
+2013-12-28  Joel Brobecker  <brobecker@adacore.com>
+
+       * gdb.texinfo (Types In Python): Fix the documentation of
+       attribute "bitpos" in class gdb.Field for enum types.  Add
+       documentation for attribute "enumval" in that same class.
+
 2013-12-28  Joel Brobecker  <brobecker@adacore.com>
 
        * gdb.texinfo (GDB/MI Support Commands): Change @table into
index 52a26949ac928fdf4df5e5995586c4d5879ab751..3fa099997695bcb948c24083cd6d57a1e0dbb63e 100644 (file)
@@ -24337,10 +24337,13 @@ into one of these categories, an empty sequence will be returned.
 Each field is a @code{gdb.Field} object, with some pre-defined attributes:
 @table @code
 @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.  For @code{enum} fields, the value is the
-enumeration member's integer representation.
+This attribute is not available for @code{enum} or @code{static}
+(as in C@t{++} or Java) fields.  The value is the bit position of
+the field.
+
+@item enumval
+This attribute is only available for @code{enum} fields, and its value
+is the enumeration member's integer representation.
 
 @item name
 The name of the field, or @code{None} for anonymous fields.
This page took 0.048299 seconds and 4 git commands to generate.