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: [RFA/doco] Fix gdb.Field attributes documentation for enum types.


> > 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.
> > 
> > Tested on x86_linux. OK to check in?
> 
> I guess so, although I'm not sure the reader will always understand
> the exact meaning of "bit position of the field".  Maybe we should
> explain some more?

This is independent from the change I was making, but true, so
attached is a patch that tries to help. In the meantime, the patch
above is now in.

gdb/doc/ChangeLog:

        * gdb.texinfo (Types In Python): Clarify the documentation
        of attribute gdb.Field.bitpos.

-- 
Joel
>From 616c57df75b3e0f3f943f5d13ac2f3cb9ac28c17 Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Sat, 28 Dec 2013 07:24:36 +0400
Subject: [PATCH] Clarify documentation of the gdb.Field.bitpos attribute

gdb/doc/ChangeLog:

        * gdb.texinfo (Types In Python): Clarify the documentation
        of attribute gdb.Field.bitpos.
---
 gdb/doc/gdb.texinfo | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 3fa0999..a60e6cf 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -24338,8 +24338,8 @@ Each field is a @code{gdb.Field} object, with some pre-defined attributes:
 @table @code
 @item bitpos
 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.
+(as in C@t{++} or Java) fields.  The value is the position, counting
+in bits, from the start of the containing type.
 
 @item enumval
 This attribute is only available for @code{enum} fields, and its value
-- 
1.8.3.2


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