proc-events.c: fix compilation on Solaris
[deliverable/binutils-gdb.git] / gdb / solib-spu.c
index e6eab63854e455180804f286159e3eea856b3767..cb735fd451c38e85bbaf5e8b95a6ee69e966cf7c 100644 (file)
@@ -1,5 +1,5 @@
 /* Cell SPU GNU/Linux support -- shared library handling.
-   Copyright (C) 2009-2017 Free Software Foundation, Inc.
+   Copyright (C) 2009-2018 Free Software Foundation, Inc.
 
    Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
 
@@ -30,7 +30,7 @@
 #include "solist.h"
 #include "inferior.h"
 #include "objfiles.h"
-#include "observer.h"
+#include "observable.h"
 #include "breakpoint.h"
 #include "gdbthread.h"
 #include "gdb_bfd.h"
@@ -320,7 +320,7 @@ spu_bfd_iovec_stat (bfd *abfd, void *stream, struct stat *sb)
 }
 
 static gdb_bfd_ref_ptr
-spu_bfd_fopen (char *name, CORE_ADDR addr)
+spu_bfd_fopen (const char *name, CORE_ADDR addr)
 {
   CORE_ADDR *open_closure = XNEW (CORE_ADDR);
 
@@ -342,9 +342,9 @@ spu_bfd_fopen (char *name, CORE_ADDR addr)
 
 /* Open shared library BFD.  */
 static gdb_bfd_ref_ptr
-spu_bfd_open (char *pathname)
+spu_bfd_open (const char *pathname)
 {
-  char *original_name = strrchr (pathname, '@');
+  const char *original_name = strrchr (pathname, '@');
   asection *spu_name;
   unsigned long long addr;
   int fd;
@@ -542,13 +542,10 @@ spu_solib_loaded (struct so_list *so)
     }
 }
 
-/* -Wmissing-prototypes */
-extern initialize_file_ftype _initialize_spu_solib;
-
 void
 _initialize_spu_solib (void)
 {
-  observer_attach_solib_loaded (spu_solib_loaded);
+  gdb::observers::solib_loaded.attach (spu_solib_loaded);
   ocl_program_data_key = register_objfile_data ();
 }
 
This page took 0.024493 seconds and 4 git commands to generate.