Change iterate_over_breakpoints to take a function_view
[deliverable/binutils-gdb.git] / gdb / guile / scm-progspace.c
index a95e8348cc698b0c8c97ae060e64b953323db660..352d32d147fff47ae4e8ff8c4823950ce14afa18 100644 (file)
@@ -1,6 +1,6 @@
 /* Guile interface to program spaces.
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -126,7 +126,7 @@ psscm_release_pspace (pspace_smob *p_smob)
 static void
 psscm_handle_pspace_deleted (struct program_space *pspace, void *datum)
 {
-  pspace_smob *p_smob = datum;
+  pspace_smob *p_smob = (pspace_smob *) datum;
 
   gdb_assert (p_smob->pspace == pspace);
 
@@ -158,7 +158,7 @@ psscm_pspace_smob_from_pspace (struct program_space *pspace)
 {
   pspace_smob *p_smob;
 
-  p_smob = program_space_data (pspace, psscm_pspace_data_key);
+  p_smob = (pspace_smob *) program_space_data (pspace, psscm_pspace_data_key);
   if (p_smob == NULL)
     {
       SCM p_scm = psscm_make_pspace_smob ();
@@ -285,20 +285,19 @@ gdbscm_progspace_objfiles (SCM self)
 {
   pspace_smob *p_smob
     = psscm_get_valid_pspace_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
-  struct objfile *objfile;
   SCM result;
 
   result = SCM_EOL;
 
-  ALL_PSPACE_OBJFILES (p_smob->pspace, objfile)
-  {
-    if (objfile->separate_debug_objfile_backlink == NULL)
-      {
-       SCM item = ofscm_scm_from_objfile (objfile);
+  for (objfile *objfile : p_smob->pspace->objfiles ())
+    {
+      if (objfile->separate_debug_objfile_backlink == NULL)
+       {
+         SCM item = ofscm_scm_from_objfile (objfile);
 
-       result = scm_cons (item, result);
-      }
-  }
+         result = scm_cons (item, result);
+       }
+    }
 
   /* We don't really have to return the list in the same order as recorded
      internally, but for consistency we do.  We still advertise that one
This page took 0.026488 seconds and 4 git commands to generate.