Commit Graph

8 Commits

Author SHA1 Message Date
Jason Thorpe 70f80edf7c * Makefile.in (SFILES): Add osabi.c.
(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.
2002-05-21 15:36:03 +00:00
Jason Thorpe 5868c862e2 * alpha-tdep.h (gdbarch_tdep): Add sigcontext_addr member.
* alpha-tdep.c (alpha_sigcontext_addr): New function.
(alpha_find_saved_regs): Use alpha_sigcontext_addr.
(alpha_gdbarch_init): Initialize tdep->sigcontext_addr.
* alpha-linux-tdep.c: Include frame.h.
(alpha_linux_sigcontext_addr): New function.
(alpha_linux_init_abi): Set tdep->sigcontext_addr to
alpha_linux_sigcontext_addr.
* alpha-osf1-tdep.c: Include gdbcore.h.
(alpha_osf1_sigcontext_addr): New function.
(alpha_osf1_init_abi): Set tdep->sigcontext_addr to
alpha_osf1_sigcontext_addr.
* config/alpha/tm-alpha.h (SIGCONTEXT_ADDR): Remove.
* config/alpha/tm-alphalinux.h (SIGCONTEXT_ADDR): Remove.
2002-04-26 07:05:35 +00:00
Jason Thorpe accc6d1ff3 * alpha-tdep.h (gdbarch_tdep): Add jb_pc and jb_elt_size members.
* alpha-linux-tdep.c (alpha_linux_init_abi): Initialize
tdep->jb_pc and tdep->jb_elt_size.
* alpha-osf1-tdep.c (alpha_osf1_init_abi): Likewise.
* alphafbsd-tdep.c (alphafbsd_init_abi): Likewise.
* alphanbsd-tdep.c (alphanbsd_init_abi): Likewise.
* alpha-nat.c (get_longjmp_target): Remove.
(JB_ELEMENT_SIZE): Ditto.
(JB_PC): Ditto.
* alpha-tdep.c (alpha_get_longjmp_target): New function.
(alpha_gdbarch_init): Default tdep->jb_pc to -1.  If the
OS ABI sets jb_pc to a valid value, set gdbarch_get_longjmp_target
to alpha_get_longjmp_target.
(alpha_dump_tdep): Report tdep->jb_pc and tdep->jb_elt_size.
* config/alpha/nm-linux.h (GET_LONGJMP_TARGET): Remove.
* config/alpha/nm-osf.h (GET_LONGJMP_TARGET): Remove.
2002-04-26 01:08:19 +00:00
Jason Thorpe 36a6271d5e * Makefile.in (ALLDEPFILES): Add alpha-osf1-tdep.c.
(alpha-osf1-tdep.o): New dependency list.
* alpha-tdep.h (gdbarch_tdep): Add dynamic_sigtramp_offset
and skip_sigtramp_frame members.
* alpha-linux-tdep.c: Include gdbcore.h.
(alpha_linux_sigtramp_offset): Change return type to LONGEST.
(alpha_linux_init_abi): Initialize tdep->dynamic_sigtramp_offset.
* alpha-osf1-tdep.c: New file.
* alpha-tdep.c (alpha_osf_skip_sigtramp_frame): Moved to
alpha-osf1-dep.c.
(alpha_frame_past_sigtramp_frame): New function.
(alpha_dynamic_sigtramp_offset): Ditto.
(alpha_proc_desc_is_dyn_sigtramp): Ditto.
(alpha_set_proc_desc_is_dyn_sigtramp): Ditto.
(ALPHA_PROC_SIGTRAMP_MAGIC): Define.
(push_sigtramp_desc): Use alpha_set_proc_desc_is_dyn_sigtramp.
(after_prologue): Use alpha_proc_desc_is_dyn_sigtramp.
(find_proc_desc): Use alpha_dynamic_sigtramp_offset.
(alpha_frame_chain): Use alpha_frame_past_sigtramp_frame.
(alpha_init_extra_frame_info): Use alpha_proc_desc_is_dyn_sigtramp.
(alpha_pop_frame): Use alpha_proc_desc_is_dyn_sigtramp.
(alpha_gdbarch_init): Initialize tdep->dynamic_sigtramp_offset
and tdep->skip_sigtramp_frame.  Set gdbarch_skip_trampoline_code
to find_solib_trampoline_target.
* config/alpha/alpha-osf1.mt (TDEPFILES): Add alpha-osf1-tdep.o.
* config/alpha/tm-alpha.h: Remove inclusion of regcache.h.
(SKIP_TRAMPOLINE_CODE): Remove.
(PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
(SET_PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
(DYNAMIC_SIGTRAMP_OFFSET): Ditto.
(FRAME_PAST_SIGTRAMP_FRAME): Ditto.
* config/alpha/tm-alphalinux.h (PROC_DESC_IS_DYN_SIGTRAMP): Remove.
(PROC_SIGTRAMP_MAGIC): Ditto.
(PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
(SET_PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
(SET_PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
(DYNAMIC_SIGTRAMP_OFFSET): Ditto.
(FRAME_PAST_SIGTRAMP_FRAME): Ditto.
2002-04-25 02:28:57 +00:00
Jason Thorpe 4bcbd6cb5f * config/alpha/tm-alpha.h: Move alpha_software_single_step
prototype from here...
* alpha-tdep.h: ...to here.
2002-04-21 20:27:29 +00:00
Jason Thorpe 44dffaac91 * alpha-tdep.c (alpha_abi_handler): New structure to describe
an Alpha ABI variant.
(alpha_abi_handler_list): Declare.
(alpha_gdbarch_register_os_abi): New function.
(alpha_gdbarch_init): Give registered ABI variant handlers a
chance to tweak the gdbarch once we have set up defaults.
* alpha-tdep.h: Prototype alpha_gdbarch_register_os_abi.
2002-04-21 18:24:48 +00:00
Jason Thorpe d9b023ccd4 * alpha-tdep.h (gdbarch_tdep): Add vm_min_address member.
* alpha-tdep.c (heuristic_proc_start): Use vm_min_address
from gdbarch_tdep rather than a constant.
(alpha_gdbarch_init): Initialize tdep->vm_min_address to
the default text address for all Alpha Unix ABIs.
(alpha_dump_tdep): Report the value of tdep->vm_min_address.
* config/alpha/tm-alpha.h (VM_MIN_ADDRESS): Delete.
2002-04-21 17:30:09 +00:00
Jason Thorpe dc129d8238 * alpha-tdep.h: New file. Includes several Alpha target constants
taken from...
* config/alpha/tm-alpha.h: ...here.  Remove macros that we now
let gdbarch deal with.
(GDB_MULTI_ARCH): Define as GDB_MULTI_ARCH_PARTIAL.
* Makefile.in (alpha-nat.o): Add alpha-tdep.h and $(BFD_SRC)/elf-bfd
to dependency list.
* alpha-nat.c: Include alpha-tdep.h.  Update for adjusted
Alpha target register names.
* alphabsd-nat.c: Likewise.
* alpha-tdep.c: Include alpha-tdep.h.  Update for adjusted
Alpha target register names.  Make serveral routines static.
(alpha_get_saved_register): New function.
(alpha_abi_names): New.
(process_note_abi_tag_sections): New function.
(get_elfosabi): New function.
(alpha_gdbarch_init): New function.
(alpha_dump_tdep): New function.
(_initialize_alpha_tdep): Register alpha_gdbarch_init.
2002-04-21 16:52:39 +00:00