Remove most uses of ALL_OBJFILES
[deliverable/binutils-gdb.git] / gdb / guile / scm-pretty-print.c
index 9cc4f7f6b2767214a654410d4ae8ccf36a0c4b13..d621ed5e912f049e286d632074cf708b9899f6a7 100644 (file)
@@ -427,19 +427,18 @@ ppscm_search_pp_list (SCM list, SCM value)
 static SCM
 ppscm_find_pretty_printer_from_objfiles (SCM value)
 {
-  struct objfile *objfile;
-
-  ALL_OBJFILES (objfile)
-  {
-    objfile_smob *o_smob = ofscm_objfile_smob_from_objfile (objfile);
-    SCM pp = ppscm_search_pp_list (ofscm_objfile_smob_pretty_printers (o_smob),
-                                  value);
-
-    /* Note: This will return if pp is a <gdb:exception> object,
-       which is what we want.  */
-    if (gdbscm_is_true (pp))
-      return pp;
-  }
+  for (objfile *objfile : all_objfiles (current_program_space))
+    {
+      objfile_smob *o_smob = ofscm_objfile_smob_from_objfile (objfile);
+      SCM pp
+       = ppscm_search_pp_list (ofscm_objfile_smob_pretty_printers (o_smob),
+                               value);
+
+      /* Note: This will return if pp is a <gdb:exception> object,
+        which is what we want.  */
+      if (gdbscm_is_true (pp))
+       return pp;
+    }
 
   return SCM_BOOL_F;
 }
This page took 0.025185 seconds and 4 git commands to generate.