Remove most uses of ALL_OBJFILES
[deliverable/binutils-gdb.git] / gdb / python / py-xmethods.c
index a1f7b1da5c75108f0eb874aa46e53e7c43c09e2d..acf521dfe3441d98704669944028dfa52d7e41d4 100644 (file)
@@ -121,8 +121,6 @@ gdbpy_get_matching_xmethod_workers
    struct type *obj_type, const char *method_name,
    std::vector<xmethod_worker_up> *dm_vec)
 {
-  struct objfile *objfile;
-
   gdb_assert (obj_type != NULL && method_name != NULL);
 
   gdbpy_enter enter_py (get_current_arch (), current_language);
@@ -145,7 +143,7 @@ gdbpy_get_matching_xmethod_workers
   /* Gather debug method matchers registered with the object files.
      This could be done differently by iterating over each objfile's matcher
      list individually, but there's no data yet to show it's needed.  */
-  ALL_OBJFILES (objfile)
+  for (objfile *objfile : all_objfiles (current_program_space))
     {
       gdbpy_ref<> py_objfile = objfile_to_objfile_object (objfile);
 
This page took 0.023562 seconds and 4 git commands to generate.