Daniel Jacobowitz wrote about some Python/GDB experiences and bugs in the email: http://sourceware.org/ml/archer/2009-q4/msg00008.html This bug (and others in their own bugs) is extracted from that email to track the issue: * The Python bindings do not expose array bounds. I had to use sizeof to determine the size and assume the array was zero-indexed (which is C-specific)
Subject: Bug 10804 CVSROOT: /cvs/src Module name: src Changes by: pmuldoon@sourceware.org 2009-12-08 14:06:05 Modified files: gdb : ChangeLog gdb/doc : ChangeLog gdb.texinfo gdb/python : py-type.c gdb/testsuite : ChangeLog gdb/testsuite/gdb.python: py-type.exp Log message: 2009-12-08 Phil Muldoon <pmuldoon@redhat.com> PR python/10804 * python/py-type.c (typy_range): New Function. 2009-12-08 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-type.exp (test_range): New test. 2009-12-08 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Types In Python): Describe range function. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.11135&r2=1.11136 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/doc/ChangeLog.diff?cvsroot=src&r1=1.979&r2=1.980 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/doc/gdb.texinfo.diff?cvsroot=src&r1=1.647&r2=1.648 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/python/py-type.c.diff?cvsroot=src&r1=1.3&r2=1.4 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2045&r2=1.2046 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.python/py-type.exp.diff?cvsroot=src&r1=1.1&r2=1.2
Closed. re comment #1.