* 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.
This commit is contained in:
Ulrich Weigand 2007-10-24 21:15:35 +00:00
parent d542061a79
commit 734598d921
5 changed files with 49 additions and 6 deletions

View File

@ -1,3 +1,13 @@
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.

View 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) \

View 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

View 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;
}

26
gdb/solib-irix.h Normal file
View File

@ -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 */