Tom Tromey
ddae946278
Fix PR python/17386 - add __index__ method to gdb.Value
...
This patch fixes PR python/17386.
The bug is that gdb.Value does not implement the Python __index__
method. This method is needed to convert a Python object to an index
and is used by various operations in Python, such as indexing an
array.
The fix is to implement the nb_index method for gdb.Value.
nb_index was added in Python 2.5. I don't have a good way to test
Python 2.4, but I made an attempt to accomodate it.
I chose to use valpy_long in all cases because this simplifies porting
to Python 3, and because there didn't seem to be any harm.
Built and regtested on x86-64 Fedora 23.
2016-05-24 Tom Tromey <tom@tromey.com>
PR python/17386:
* python/py-value.c (value_object_as_number): Add
nb_inplace_floor_divide, nb_inplace_true_divide, nb_index.
2016-05-24 Tom Tromey <tom@tromey.com>
PR python/17386:
* gdb.python/py-value.exp (test_value_numeric_ops): Add tests that
use value as an index.
2016-05-24 10:05:59 -06:00
..
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-03-10 17:12:30 -05:00
2016-03-10 17:12:30 -05:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-05-24 09:55:01 -06:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-04-27 18:09:14 -04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-12 01:12:38 +00:00
2016-01-13 11:00:54 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-04-09 08:41:41 -04:00
2016-03-31 15:32:38 +03:00
2016-03-31 15:32:38 +03:00
2016-04-06 09:39:16 +03:00
2016-01-01 08:43:22 +04:00
2016-04-06 09:39:16 +03:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-05-23 10:08:34 -06:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-20 13:44:33 -05:00
2016-01-20 13:44:33 -05:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-05-23 10:08:34 -06:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-18 14:30:23 +00:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-04-27 18:09:14 -04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-05-24 10:05:59 -06:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00
2016-01-01 08:43:22 +04:00