* mips-irix-tdep.c: Include "gdb_string.h", "solib.h", "solib-irix.h".
authorUlrich Weigand <uweigand@de.ibm.com>
Wed, 24 Oct 2007 21:15:35 +0000 (21:15 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Wed, 24 Oct 2007 21:15:35 +0000 (21:15 +0000)
(mips_irix_init_abi): Call set_solib_ops.
* solib-irix.c: Include "solib.h" and "solib-irix.h".
(irix_so_ops): Make global.
(_initialize_irix_solib): Do not set current_target_so_ops.
* solib-irix.h: New file.
* Makefile.in: Update dependencies.

gdb/ChangeLog
gdb/Makefile.in
gdb/mips-irix-tdep.c
gdb/solib-irix.c
gdb/solib-irix.h [new file with mode: 0644]

index e78fc31..df587da 100644 (file)
@@ -1,5 +1,15 @@
 2007-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
 
+       * mips-irix-tdep.c: Include "gdb_string.h", "solib.h", "solib-irix.h".
+       (mips_irix_init_abi): Call set_solib_ops.
+       * solib-irix.c: Include "solib.h" and "solib-irix.h".
+       (irix_so_ops): Make global.
+       (_initialize_irix_solib): Do not set current_target_so_ops.
+       * solib-irix.h: New file.
+       * Makefile.in: Update dependencies.
+
+2007-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
+
        * configure.tgt: Remove hppa*64*-*-hpux11* special case.
        * config/pa/hppa64.mt: Delete file.
        * config/pa/hppahpux.mt (MT_CFLAGS): Remove.
index a2b192b..56dc679 100644 (file)
@@ -802,6 +802,7 @@ sh_tdep_h = sh-tdep.h
 sim_regno_h = sim-regno.h
 sol2_tdep_h = sol2-tdep.h
 solib_h = solib.h
+solib_irix_h = solib-irix.h
 solib_pa64_h = solib-pa64.h
 solib_som_h = solib-som.h
 solib_svr4_h = solib-svr4.h
@@ -2377,7 +2378,8 @@ mips64obsd-nat.o: mips64obsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
 mips64obsd-tdep.o: mips64obsd-tdep.c $(defs_h) $(osabi_h) $(regcache_h) \
        $(regset_h) $(trad_frame_h) $(tramp_frame_h) $(gdb_assert_h) \
        $(gdb_string_h) $(mips_tdep_h) $(solib_svr4_h)
-mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) $(osabi_h) $(elf_bfd_h)
+mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) $(osabi_h) $(gdb_string_h) \
+       $(solib_h) $(solib_irix_h) $(elf_bfd_h)
 mips-linux-nat.o: mips-linux-nat.c $(defs_h) $(mips_tdep_h) $(target_h) \
        $(regcache_h) $(linux_nat_h) $(gdb_proc_service_h) $(gregset_h) \
        $(mips_linux_tdep_h) $(inferior_h) $(target_descriptions_h) \
@@ -2630,7 +2632,8 @@ solib-frv.o: solib-frv.c $(defs_h) $(gdb_string_h) $(inferior_h) \
        $(gdbcore_h) $(solist_h) $(frv_tdep_h) $(objfiles_h) $(symtab_h) \
        $(language_h) $(command_h) $(gdbcmd_h) $(elf_frv_h) $(solib_h)
 solib-irix.o: solib-irix.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
-       $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h)
+       $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) \
+       $(solib_h) $(solib_irix_h)
 solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) $(solib_svr4_h)
 solib-null.o: solib-null.c $(defs_h) $(solist_h)
 solib-osf.o: solib-osf.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
index dba695a..c4997e7 100644 (file)
@@ -20,6 +20,9 @@
 
 #include "defs.h"
 #include "osabi.h"
+#include "gdb_string.h"
+#include "solib.h"
+#include "solib-irix.h"
 
 #include "elf-bfd.h"
 
@@ -78,6 +81,7 @@ static void
 mips_irix_init_abi (struct gdbarch_info info,
                     struct gdbarch *gdbarch)
 {
+  set_solib_ops (gdbarch, &irix_so_ops);
 }
 
 void
index e129cf3..0455328 100644 (file)
@@ -33,6 +33,9 @@
 #include "inferior.h"
 
 #include "solist.h"
+#include "solib.h"
+#include "solib-irix.h"
+
 
 /* Link map info to include in an allocate so_list entry.  Unlike some
    of the other solib backends, this (Irix) backend chooses to decode
@@ -705,7 +708,7 @@ irix_in_dynsym_resolve_code (CORE_ADDR pc)
   return 0;
 }
 
-static struct target_so_ops irix_so_ops;
+struct target_so_ops irix_so_ops;
 
 void
 _initialize_irix_solib (void)
@@ -718,7 +721,4 @@ _initialize_irix_solib (void)
   irix_so_ops.current_sos = irix_current_sos;
   irix_so_ops.open_symbol_file_object = irix_open_symbol_file_object;
   irix_so_ops.in_dynsym_resolve_code = irix_in_dynsym_resolve_code;
-
-  /* FIXME: Don't do this here.  *_gdbarch_init() should set so_ops. */
-  current_target_so_ops = &irix_so_ops;
 }
diff --git a/gdb/solib-irix.h b/gdb/solib-irix.h
new file mode 100644 (file)
index 0000000..5fe8014
--- /dev/null
@@ -0,0 +1,26 @@
+/* Handle shared libraries for GDB, the GNU Debugger.
+
+   Copyright (C) 2007 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef SOLIB_IRIX_H
+#define SOLIB_IRIX_H
+
+struct target_so_ops;
+extern struct target_so_ops irix_so_ops;
+
+#endif /* solib-irix.h */