* mips-tdep.c (enum mips_abi): Explicitly start at 0. Add
MIPS_ABI_LAST.
(mips_abi_string, mips_abi_strings): New.
(struct gdbarch_tdep): Remove mips_abi_string, add found_abi.
(mips_gdbarch_init): Set tdep->found_abi. Don't set
tdep->mips_abi_string. Honor mips_abi_string. Default to
O32 if no ABI is found.
(mips_dump_tdep): Use mips_abi_strings.
(mips_abi_update): New function.
(_initialize_mips_tdep): Initialize mips_abi_string. Add
``set mips abi'' and ``show mips abi''. Check the size of
mips_abi_strings.
* mips-tdep.c (PROC_SYMBOL): Add warning comment.
(struct mips_objfile_private, compare_pdr_entries): New.
(non_heuristic_proc_desc): Read the ".pdr" section if it
is present.
(COMMON_OBS): Add osabi.o.
(osabi.o): New dependency list.
* osabi.c: New file.
* osabi.h: New file.
* doc/gdbint.texinfo: Document new generic OS ABI framework.
* Makefile.in (alpha_tdep_h): Define and use instead of
alpha-tdep.h.
* alpha-tdep.c (alpha_abi_names, process_note_abi_tag_sections,
get_elfosabi, alpha_abi_handler_list, alpha_gdbarch_register_os_abi):
Remove.
(alpha_gdbarch_init, alpha_dump_tdep): Use generic OS ABI framework.
* alpha-tdep.h: Include osabi.h.
(alpha_abi): Remove.
(gdbarch_tdep): Use generic OS ABI framework.
* alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Use
gdbarch_register_osabi.
* alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Likewise.
* alphafbsd-tdep.c (_initialize_alphafbsd_tdep): Likewise.
* alphanbsd-tdep.c (_initialize_alphanbsd_tdep): Likewise.
* Makefile.in (sh_tdep_h): Add osabi.h.
* sh-tdep.h (sh_osabi): Remove.
(gdbarch_tdep): Use generic OS ABI framework.
* sh-tdep.c (sh_osabi_names, process_note_abi_tag_sections,
sh_osabi_handler_list, sh_gdbarch_register_os_abi): Remove.
(sh_gdbarch_init, sh_dump_tdep): Use generic OS ABI framework.
* shnbsd-tdep.c (_initialize_shnbsd_tdep): Use gdbarch_register_osabi.
* Makefile.in (arm_tdep_h): Define and use instead of arm-tdep.h.
* arm-linux-tdep.c (_initialize_arm_linux_tdep): Use
gdbarch_register_osabi.
* arm-tdep.c (arm_abi_names, process_note_abi_tag_sections,
arm_abi_handler_list, arm_gdbarch_register_os_abi): Remove.
(get_elfosabi): Rename to...
(arm_elf_osabi_sniffer): ...this. Adjust to use generic OS
ABI framework support routines.
(arm_gdbarch_init): Use generic OS ABI framework.
(arm_dump_tdep): Likewise.
(_initialize_arm_tdep): Likewise.
* arm-tdep.h: Include osabi.h.
(arm_abi): Remove.
(gdbarch_tdep): Remove arm_abi and abi_name members. Add
osabi member.
(arm_gdbarch_register_os_abi): Remove prototype.
* armnbsd-tdep.c (arm_netbsd_aout_osabi_sniffer): New function.
(_initialize_arm_netbsd_tdep): Use gdbarch_register_osabi.
* Makefile.in (mips-tdep.o): Add osabi.h to dependency list.
* mips-tdep.c: Include osabi.h.
(gdbarch_tdep, mips_gdbarch_init, mips_dump_tdep): Use generic
OS ABI framework.
* mips-tdep.c (mips_float_register_type): New function.
(mips_double_register_type): New function.
(mips_print_register): Use them.
(do_fp_register_row): Likewise.
* dwarf2cfi.c (cfi_write_fp): Document as not used.
* mips-tdep.c (mips_gdbarch_init): Do not set write_fp.
* ia64-tdep.c (ia64_gdbarch_init): Do not set write_fp.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Do not set write_fp.
* rs6000-tdep.c (rs6000_gdbarch_init): Do not set write_fp.
* s390-tdep.c (s390_gdbarch_init): Do not set write_fp.
(s390_write_fp):
* sh-tdep.c (sh_gdbarch_init): Do not set write_fp.
* x86-64-tdep.c (i386_gdbarch_init): Do not set write_fp.
* d10v-tdep.c (d10v_gdbarch_init): Do not set write_fp.
(d10v_write_fp): Delete function.
* inferior.h (write_fp, generic_target_write_fp): Delete
declarations.
* regcache.c (generic_target_write_fp): Delete function.
(write_fp): Delete function.
* gdbarch.sh (TARGET_WRITE_FP): Delete.
* gdbarch.h, gdbarch.c: Regenerate.
* config/v850/tm-v850.h (TARGET_WRITE_FP): Delete macro.
* config/sparc/tm-sp64.h (TARGET_WRITE_FP): Delete macro.
(sparc64_write_fp): Delete declaration.
* config/h8500/tm-h8500.h (TARGET_WRITE_FP): Delete macro.
(h8500_write_fp): Delete declaration.
Don Howard <dhoward@redhat.com>
* mips-tdep.c (ST0_FR): Define.
(mips2_fp_compat): New function, temporarily disabled.
(mips_read_fp_register_single): New function.
(mips_read_fp_register_double): New function.
(mips_print_register): Use them.
(do_fp_register_row): Likewise.
* config/mips/irix6.mh: New file.
* config/mips/irix6.mt: New file.
* config/mips/xm-irix6.h: New file.
* config/mips/nm-irix6.h: New file.
* mips-tdep.c (mips_gdbarch_init) <MIPS_ABI_N32>: Set up the
disassembler info in tm_print_insn_info as appropriate for the N32
ABI. Force N32 ABI to be the default if the CPU is R8000 or
R10000.
* configure.tgt (mips*-sgi-irix6*): Map to irix6.
* configure.host (mips*-sgi-irix6*): Ditto.
``fmt''. Make ``offset'' a CORE_ADDR.
(print_unpack): Delete.
(extended_offset): Construct and return a CORE_ADDR.
(fetch_mips_16): Return an int. Don't assume short is 16 bits.
(unpack_mips16): Rewrite. Add ``extension'' parameter instead of
incorrectly guessing if the instruction had an extension.
(map16): Delete array.
(mips16_op): Delete macro.
(extended_mips16_next_pc): Rewrite of old mips16_next_pc function.
When an extended instruction do a recursive call.
(mips16_next_pc): Call extended_mips16_next_pc.
(mips_next_pc): Cleanup.