Add a new 'info proc files' subcommand of 'info proc'.
[deliverable/binutils-gdb.git] / gdb / python / py-xmethods.c
index f7e3c37210cc008e533ed522c58bb8a344fbb19a..8e616cd4e2d6410694e9bf924ca003fbccc3f234 100644 (file)
@@ -122,7 +122,6 @@ gdbpy_get_matching_xmethod_workers
    std::vector<xmethod_worker_up> *dm_vec)
 {
   struct objfile *objfile;
-  PyObject *py_progspace;
 
   gdb_assert (obj_type != NULL && method_name != NULL);
 
@@ -148,7 +147,7 @@ gdbpy_get_matching_xmethod_workers
      list individually, but there's no data yet to show it's needed.  */
   ALL_OBJFILES (objfile)
     {
-      PyObject *py_objfile = objfile_to_objfile_object (objfile);
+      gdbpy_ref<> py_objfile = objfile_to_objfile_object (objfile);
 
       if (py_objfile == NULL)
        {
@@ -156,7 +155,8 @@ gdbpy_get_matching_xmethod_workers
          return EXT_LANG_RC_ERROR;
        }
 
-      gdbpy_ref<> objfile_matchers (objfpy_get_xmethods (py_objfile, NULL));
+      gdbpy_ref<> objfile_matchers (objfpy_get_xmethods (py_objfile.get (),
+                                                        NULL));
       gdbpy_ref<> temp (PySequence_Concat (py_xmethod_matcher_list.get (),
                                           objfile_matchers.get ()));
       if (temp == NULL)
@@ -170,10 +170,11 @@ gdbpy_get_matching_xmethod_workers
 
   /* Gather debug methods matchers registered with the current program
      space.  */
-  py_progspace = pspace_to_pspace_object (current_program_space);
+  gdbpy_ref<> py_progspace = pspace_to_pspace_object (current_program_space);
   if (py_progspace != NULL)
     {
-      gdbpy_ref<> pspace_matchers (pspy_get_xmethods (py_progspace, NULL));
+      gdbpy_ref<> pspace_matchers (pspy_get_xmethods (py_progspace.get (),
+                                                     NULL));
 
       gdbpy_ref<> temp (PySequence_Concat (py_xmethod_matcher_list.get (),
                                           pspace_matchers.get ()));
This page took 0.024664 seconds and 4 git commands to generate.