[PATCH] Convert CORE_ADDR to Python using gdb_py_object_from_ulongest
Joel Brobecker
brobecker@adacore.com
Fri Aug 14 23:49:48 GMT 2020
Hi Tom,
On Wed, Aug 12, 2020 at 09:25:34AM -0600, Tom Tromey wrote:
> 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-12 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.
This looks good to me.
--
Joel
More information about the Gdb-patches
mailing list