Re: [PATCH] gdb/python: add property ranges to gdb.Block object

Tom Tromey
2026-03-12T12:36:47Z

Jan> + const struct block *block = NULL;

In new code we're writing 'nullptr'

Jan> + if (ranges.size() == 0)

Space before "(".

Jan> + gdbpy_ref<> ranges_obj (PyTuple_New (ranges.size ()));

Error check.

Jan> + gdbpy_ref<> range_obj (Py_BuildValue ("(KK)", ranges[i].start (),
Jan> + ranges[i].end ()));

Another error check.

Someday maybe we'll land the "safety" approach and this stuff will be easier.

thanks,
Tom