Files
binutils-gdb/gdb/python
Hannes Domani 8a2e940b8d Enable call of overloaded subscript operator from python
If you try to use the overloaded subscript operator of a class
in python, it fails like this:

(gdb) py print(gdb.parse_and_eval('b')[5])
Traceback (most recent call last):
  File "<string>", line 1, in <module>
gdb.error: Cannot subscript requested type.
Error while executing Python code.

This simply checks if such an operator exists, and calls it
instead, making this possible:

(gdb) py print(gdb.parse_and_eval('b')[5])
102 'f'

Approved-By: Tom Tromey <tom@tromey.com>
2024-06-03 17:23:26 +02:00
..
2024-04-25 12:59:02 -04:00
2024-04-25 12:59:02 -04:00
2024-04-25 12:59:02 -04:00
2024-05-17 09:39:41 -06:00
2024-04-25 12:59:02 -04:00
2024-04-25 12:59:02 -04:00
2024-04-25 12:59:02 -04:00
2024-04-02 11:21:39 -06:00
2024-04-25 12:59:02 -04:00