* frv-tdep.c: Include "solib.h".

(frv_gdbarch_init): Call set_solib_ops.
	* frv-tdep.h (struct target_so_ops): Add forward reference.
	(frv_so_ops): Add extern declaration.
	* solib-frv.c (frv_so_ops): Make global.
	(_initialize_frv_solib): Do not set current_target_so_ops.
	* Makefile.in: Update dependencies.
This commit is contained in:
Ulrich Weigand 2007-10-24 21:08:23 +00:00
parent e8a92f7b86
commit 917630e4a0
5 changed files with 20 additions and 5 deletions

View file

@ -1,3 +1,13 @@
2007-10-24 Ulrich Weigand <uweigand@de.ibm.com>
* frv-tdep.c: Include "solib.h".
(frv_gdbarch_init): Call set_solib_ops.
* frv-tdep.h (struct target_so_ops): Add forward reference.
(frv_so_ops): Add extern declaration.
* solib-frv.c (frv_so_ops): Make global.
(_initialize_frv_solib): Do not set current_target_so_ops.
* Makefile.in: Update dependencies.
2007-10-24 Ulrich Weigand <uweigand@de.ibm.com>
* solib.c (solib_global_lookup): Use solib_ops instead of global

View file

@ -2049,7 +2049,8 @@ frv-tdep.o: frv-tdep.c $(defs_h) $(gdb_string_h) $(inferior_h) $(gdbcore_h) \
$(arch_utils_h) $(regcache_h) $(frame_h) $(frame_unwind_h) \
$(frame_base_h) $(trad_frame_h) $(dis_asm_h) $(gdb_assert_h) \
$(sim_regno_h) $(gdb_sim_frv_h) $(opcodes_frv_desc_h) $(symtab_h) \
$(elf_bfd_h) $(elf_frv_h) $(osabi_h) $(infcall_h) $(frv_tdep_h)
$(elf_bfd_h) $(elf_frv_h) $(osabi_h) $(infcall_h) $(solib_h) \
$(frv_tdep_h)
f-typeprint.o: f-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
$(f_lang_h) $(gdb_string_h)

View file

@ -37,6 +37,7 @@
#include "elf/frv.h"
#include "osabi.h"
#include "infcall.h"
#include "solib.h"
#include "frv-tdep.h"
extern void _initialize_frv_tdep (void);
@ -1563,6 +1564,8 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_convert_from_func_ptr_addr (gdbarch,
frv_convert_from_func_ptr_addr);
set_solib_ops (gdbarch, &frv_so_ops);
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);

View file

@ -114,3 +114,7 @@ CORE_ADDR frv_fdpic_find_canonical_descriptor (CORE_ADDR entry_point);
/* Given an objfile, return the address of its link map. This value is
needed for TLS support. */
CORE_ADDR frv_fetch_objfile_link_map (struct objfile *objfile);
struct target_so_ops;
extern struct target_so_ops frv_so_ops;

View file

@ -1272,7 +1272,7 @@ frv_fetch_objfile_link_map (struct objfile *objfile)
return 0;
}
static struct target_so_ops frv_so_ops;
struct target_so_ops frv_so_ops;
void
_initialize_frv_solib (void)
@ -1286,9 +1286,6 @@ _initialize_frv_solib (void)
frv_so_ops.open_symbol_file_object = open_symbol_file_object;
frv_so_ops.in_dynsym_resolve_code = frv_in_dynsym_resolve_code;
/* FIXME: Don't do this here. *_gdbarch_init() should set so_ops. */
current_target_so_ops = &frv_so_ops;
/* Debug this file's internals. */
add_setshow_zinteger_cmd ("solib-frv", class_maintenance,
&solib_frv_debug, _("\