Bug 10804 - GDB.Types do not expose array bounds.
Summary: GDB.Types do not expose array bounds.
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: python (show other bugs)
Version: archer
: P2 normal
Target Milestone: 7.1
Assignee: Phil Muldoon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-19 10:20 UTC by Phil Muldoon
Modified: 2009-12-08 14:08 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Muldoon 2009-10-19 10:20:24 UTC
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)
Comment 1 Sourceware Commits 2009-12-08 14:06:25 UTC
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

Comment 2 Phil Muldoon 2009-12-08 14:08:41 UTC
Closed. re comment #1.