From: Ulrich Weigand Date: Wed, 24 Oct 2007 21:08:23 +0000 (+0000) Subject: * frv-tdep.c: Include "solib.h". X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=917630e4a052582e310992c23cdf912b39687d42;p=binutils-gdb.git * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2e83ff95cf3..e1aebb62bbd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2007-10-24 Ulrich Weigand + + * 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 * solib.c (solib_global_lookup): Use solib_ops instead of global diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 05b1deb3f19..9b835b8af34 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -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) diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index a75a5ff440a..4403e6eb2a5 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -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); diff --git a/gdb/frv-tdep.h b/gdb/frv-tdep.h index 9834b50e100..b0dae735552 100644 --- a/gdb/frv-tdep.h +++ b/gdb/frv-tdep.h @@ -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; + diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c index 0e5b4d82b54..34da05eae45 100644 --- a/gdb/solib-frv.c +++ b/gdb/solib-frv.c @@ -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, _("\