diff options
-rw-r--r-- | gdb/ChangeLog | 10 | ||||
-rw-r--r-- | gdb/Makefile.in | 3 | ||||
-rw-r--r-- | gdb/frv-tdep.c | 3 | ||||
-rw-r--r-- | gdb/frv-tdep.h | 4 | ||||
-rw-r--r-- | gdb/solib-frv.c | 5 |
5 files changed, 20 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2e83ff9..e1aebb6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,15 @@ 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 current_target_so_ops. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 05b1deb..9b835b8 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 a75a5ff..4403e6e 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 9834b50..b0dae73 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 0e5b4d8..34da05e 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, _("\ |