Convert CORE_ADDR to Python using gdb_py_object_from_ulongest
authorTom Tromey <tromey@adacore.com>
Mon, 17 Aug 2020 14:50:35 +0000 (08:50 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 17 Aug 2020 14:50:35 +0000 (08:50 -0600)
commitb017825fabd0ff6f6ff2a8526d50d0b7218606d0
treea35b73b6f6bb832682dc9b0e957fe3881b4bd96c
parent7635cf797e267246b858d3daa3d781135baa0ea4
Convert CORE_ADDR to Python using gdb_py_object_from_ulongest

An internal test failed on a riscv64-elf cross build because
Inferior.search_memory returned a negative value.  I tracked this down
to to use of PyLong_FromLong in infpy_search_memory.  Then, I looked
at other conversions of CORE_ADDR to Python and fixed these as well.

I don't think there is a good way to write a test for this.

gdb/ChangeLog
2020-08-17  Tom Tromey  <tromey@adacore.com>

* python/py-inferior.c (infpy_search_memory): Use
gdb_py_object_from_ulongest.
* python/py-infevents.c (create_inferior_call_event_object)
(create_memory_changed_event_object): Use
gdb_py_object_from_ulongest.
* python/py-linetable.c (ltpy_entry_get_pc): Use
gdb_py_object_from_ulongest.
gdb/ChangeLog
gdb/python/py-inferior.c
gdb/python/py-infevents.c
gdb/python/py-linetable.c