-
- Downloads
Don't use PyInt_FromLong
Avoid the use of PyInt_FromLong, preferring gdb_py_object_from_longest instead. I found found another spot that was incorrectly handling errors (see gdbpy_create_ptid_object) while writing this patch; it is fixed here. gdb/ChangeLog 2020-09-15 Tom Tromey <tromey@adacore.com> * python/python-internal.h (PyInt_FromLong): Remove define. * python/py-value.c (convert_value_from_python): Use gdb_py_object_from_longest. * python/py-type.c (typy_get_code): Use gdb_py_object_from_longest. * python/py-symtab.c (salpy_get_line): Use gdb_py_object_from_longest. * python/py-symbol.c (sympy_get_addr_class, sympy_line): Use gdb_py_object_from_longest. * python/py-record.c (recpy_gap_reason_code): Use gdb_py_object_from_longest. * python/py-record-btrace.c (recpy_bt_insn_size) (recpy_bt_func_level, btpy_list_count): Use gdb_py_object_from_longest. * python/py-infthread.c (gdbpy_create_ptid_object): Use gdb_py_object_from_longest. Fix error handling. * python/py-framefilter.c (bootstrap_python_frame_filters): Use gdb_py_object_from_longest. * python/py-frame.c (frapy_type, frapy_unwind_stop_reason): Use gdb_py_object_from_longest. * python/py-breakpoint.c (bppy_get_type, bppy_get_number) (bppy_get_thread, bppy_get_task, bppy_get_hit_count) (bppy_get_ignore_count): Use gdb_py_object_from_longest.
Showing
- gdb/ChangeLog 26 additions, 0 deletionsgdb/ChangeLog
- gdb/python/py-breakpoint.c 6 additions, 6 deletionsgdb/python/py-breakpoint.c
- gdb/python/py-frame.c 2 additions, 2 deletionsgdb/python/py-frame.c
- gdb/python/py-framefilter.c 2 additions, 2 deletionsgdb/python/py-framefilter.c
- gdb/python/py-infthread.c 15 additions, 4 deletionsgdb/python/py-infthread.c
- gdb/python/py-record-btrace.c 5 additions, 3 deletionsgdb/python/py-record-btrace.c
- gdb/python/py-record.c 1 addition, 1 deletiongdb/python/py-record.c
- gdb/python/py-symbol.c 2 additions, 2 deletionsgdb/python/py-symbol.c
- gdb/python/py-symtab.c 1 addition, 1 deletiongdb/python/py-symtab.c
- gdb/python/py-type.c 1 addition, 1 deletiongdb/python/py-type.c
- gdb/python/py-value.c 1 addition, 1 deletiongdb/python/py-value.c
- gdb/python/python-internal.h 0 additions, 1 deletiongdb/python/python-internal.h
Loading
Please register or sign in to comment