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

[Bug python/13339] type.array(X) creates array of X+1 items


http://sourceware.org/bugzilla/show_bug.cgi?id=13339

Phil Muldoon <pmuldoon at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sourceware    |pmuldoon at redhat dot com
                   |dot org                     |

--- Comment #2 from Phil Muldoon <pmuldoon at redhat dot com> 2011-10-27 12:03:57 UTC ---
On further investigation, it seems to be working as described:

>From the GDB manual:

Return a new gdb.Type object which represents an array of this
type.  If one argument is given, it is the inclusive upper bound of
the array; in this case the lower bound is zero.  If two arguments are
given, the first argument is the lower bound of the array, and the
second argument is the upper bound of the array.  An array's length
must not be negative, but the bounds can be.

So array(2) == array(0,2) which will have a length of 3.

If you agree with this, can you close the bug?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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