mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-29 07:10:55 +08:00
Change objfile_to_objfile_object to return a new reference
This changes objfile_to_objfile_object to return a new references and fixes up all the uses. gdb/ChangeLog 2018-09-16 Tom Tromey <tom@tromey.com> * python/py-progspace.c (pspy_get_objfiles): Update. * python/python-internal.h (objfile_to_objfile_object): Change return type. * python/py-newobjfileevent.c (create_new_objfile_event_object): Update. * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): Update. * python/python.c (gdbpy_get_current_objfile): Update. (gdbpy_objfiles): Update. * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile): Update. (objfile_to_objfile_object): Return a new reference. * python/py-symtab.c (stpy_get_objfile): Update. * python/py-prettyprint.c (find_pretty_printer_from_objfiles): Update.
This commit is contained in:
@ -97,15 +97,15 @@ find_pretty_printer_from_objfiles (PyObject *value)
|
||||
|
||||
ALL_OBJFILES (obj)
|
||||
{
|
||||
PyObject *objf = objfile_to_objfile_object (obj);
|
||||
if (!objf)
|
||||
gdbpy_ref<> objf = objfile_to_objfile_object (obj);
|
||||
if (objf == NULL)
|
||||
{
|
||||
/* Ignore the error and continue. */
|
||||
PyErr_Clear ();
|
||||
continue;
|
||||
}
|
||||
|
||||
gdbpy_ref<> pp_list (objfpy_get_printers (objf, NULL));
|
||||
gdbpy_ref<> pp_list (objfpy_get_printers (objf.get (), NULL));
|
||||
gdbpy_ref<> function (search_pp_list (pp_list.get (), value));
|
||||
|
||||
/* If there is an error in any objfile list, abort the search and exit. */
|
||||
|
Reference in New Issue
Block a user