public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Python: should gdb.Value array indexing check bounds?
@ 2011-09-20 16:05 Paul_Koning
  2011-09-20 16:12 ` Matt Rice
  0 siblings, 1 reply; 4+ messages in thread
From: Paul_Koning @ 2011-09-20 16:05 UTC (permalink / raw)
  To: gdb

Currently, if a gdb.Value object corresponds to an array, array indexing is done C-style: no bounds checking, just pointer arithmetic.  That's somewhat unnatural to Python.  Should it do a range check instead, and raise IndexError for out of range index values?

That wouldn't affect indexing of pointers, since those don't have a range so the only possible approach is the C one.

                paul 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-05 18:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-20 16:05 Python: should gdb.Value array indexing check bounds? Paul_Koning
2011-09-20 16:12 ` Matt Rice
     [not found]   ` <09787EF419216C41A903FD14EE5506DD03094C6D7D@AUSX7MCPC103.AMER.DELL.COM>
2011-09-20 16:19     ` Paul Koning
2011-10-05 18:08       ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).