binutils-gdb/gdb/python
Andrew Burgess 8518ce5fc2 gdb/python: missing PyObject_IsTrue error check in bppy_init
As with the previous two commits, this commit fixes a location where
we called PyObject_IsTrue without including an error check, this time
in bppy_init.

The 'qualified' argument is supposed to be a bool, the docs say:

  The optional QUALIFIED argument is a boolean that allows
  interpreting the function passed in 'spec' as a fully-qualified
  name.  It is equivalent to 'break''s '-qualified' flag (*note
  Linespec Locations:: and *note Explicit Locations::).

It's not totally clear that the only valid values are True or False,
but I'm choosing to interpret the docs that way, and so I've added a
PyBool_Type check during argument parsing.  Now, if a non-bool is
passed the user will get a TypeError during argument parsing.  I've
added a test to cover this case.

This is a potentially breaking change to the Python API, but hopefully
this will not impact too many people.  I've added a NEWS entry to
highlight this change.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Tom Tromey <tom@tromey.com>
2024-11-14 19:34:44 +00:00
..
lib/gdb
py-all-events.def
py-arch.c gdb/python: missing PyObject_IsTrue error check in py-arch.c 2024-11-14 19:34:43 +00:00
py-auto-load.c
py-block.c
py-bpevent.c
py-breakpoint.c gdb/python: missing PyObject_IsTrue error check in bppy_init 2024-11-14 19:34:44 +00:00
py-cmd.c
py-connection.c
py-continueevent.c
py-dap.c
py-disasm.c gdb/python: remove some additional PyObject_IsTrue calls 2024-11-14 19:34:43 +00:00
py-event-types.def
py-event.c
py-event.h
py-events.h
py-evtregistry.c
py-evts.c
py-exitedevent.c
py-finishbreakpoint.c
py-frame.c
py-framefilter.c
py-function.c Call gdbpy_fix_doc_string_indentation for function help 2024-11-11 07:44:27 -07:00
py-gdb-readline.c
py-inferior.c
py-infevents.c
py-infthread.c
py-instruction.c
py-instruction.h
py-lazy-string.c
py-linetable.c
py-membuf.c
py-mi.c
py-micmd.c gdb/python: missing PyObject_IsTrue error check in micmdpy_set_installed 2024-11-14 19:34:44 +00:00
py-newobjfileevent.c
py-objfile.c
py-param.c
py-prettyprint.c
py-progspace.c
py-record-btrace.c
py-record-btrace.h
py-record-full.c
py-record-full.h
py-record.c
py-record.h
py-ref.h
py-registers.c
py-signalevent.c
py-stopevent.c
py-stopevent.h
py-symbol.c
py-symtab.c
py-threadevent.c
py-tui.c
py-type.c
py-uiout.h
py-unwind.c
py-utils.c
py-value.c gdb/python: remove some additional PyObject_IsTrue calls 2024-11-14 19:34:43 +00:00
py-varobj.c
py-xmethods.c
python-config.py
python-internal.h
python.c gdb/python: remove PyObject_IsTrue call in gdbpy_handle_missing_debuginfo 2024-11-14 19:34:43 +00:00
python.h