[PATCH 0/2] Changes to gdb.Value.__init__

Andrew Burgess aburgess@redhat.com
Wed Nov 17 14:04:24 GMT 2021


On IRC a user was asking about inheriting from gdb.Value, and how this
was not working as expected.

After looking at the code the problems seem to be caused by the way
GDB implemented gdb.Value.__new__, but not gdb.Value.__init__.

This series of commits addresses this.  If you are not trying to
inherit from gdb.Value, or to reinitialize a gdb.Value then I don't
think you should notice any changes after this series.

All feedback welcome.

Thanks,
Andrew

---

Andrew Burgess (2):
  gdb/python: replace linked list with unordered_set
  gdb/python: Use tp_init instead of tp_new to setup gdb.Value

 gdb/doc/python.texi                   |   3 +
 gdb/python/py-value.c                 | 121 ++++++++++++++------------
 gdb/testsuite/gdb.python/py-value.exp |  59 +++++++++++--
 3 files changed, 120 insertions(+), 63 deletions(-)

-- 
2.25.4



More information about the Gdb-patches mailing list