Replace throw_exception with throw in some cases
[deliverable/binutils-gdb.git] / gdb / solib-spu.c
index d68150eb3cc508d2ad938a7c714f01bbd9adafef..c5dc8639f1e286afab8edc0fbe93f39e3e36f998 100644 (file)
@@ -102,7 +102,7 @@ append_ocl_sos (struct so_list **link_ptr)
 {
   CORE_ADDR *ocl_program_addr_base;
 
-  for (objfile *objfile : all_objfiles (current_program_space))
+  for (objfile *objfile : current_program_space->objfiles ())
     {
       ocl_program_addr_base
        = (CORE_ADDR *) objfile_data (objfile, ocl_program_data_key);
@@ -110,7 +110,7 @@ append_ocl_sos (struct so_list **link_ptr)
         {
          enum bfd_endian byte_order = bfd_big_endian (objfile->obfd)?
                                         BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE;
-         TRY
+         try
            {
              CORE_ADDR data =
                read_memory_unsigned_integer (*ocl_program_addr_base,
@@ -133,7 +133,7 @@ append_ocl_sos (struct so_list **link_ptr)
                  link_ptr = &newobj->next;
                }
            }
-         CATCH (ex, RETURN_MASK_ALL)
+         catch (const gdb_exception &ex)
            {
              /* Ignore memory errors.  */
              switch (ex.error)
@@ -141,11 +141,10 @@ append_ocl_sos (struct so_list **link_ptr)
                case MEMORY_ERROR:
                  break;
                default:
-                 throw_exception (ex);
+                 throw;
                  break;
                }
            }
-         END_CATCH
        }
     }
 }
@@ -397,7 +396,7 @@ spu_lookup_lib_symbol (struct objfile *objfile,
 
   if (svr4_so_ops.lookup_lib_global_symbol != NULL)
     return svr4_so_ops.lookup_lib_global_symbol (objfile, name, domain);
-  return (struct block_symbol) {NULL, NULL};
+  return {};
 }
 
 /* Enable shared library breakpoint.  */
This page took 0.02739 seconds and 4 git commands to generate.