Commit Graph

12 Commits

Author SHA1 Message Date
Daniel Jacobowitz 7a5ea0d4f1 * arm-linux-tdep.c (ARM_LINUX_JB_ELEMENT_SIZE): Define to
INT_REGISTER_SIZE.
	(arm_linux_push_arguments): Use TARGET_DOUBLE_BIT instead of
	FP_REGISTER_VIRTUAL_SIZE.
	* arm-tdep.c (arm_make_sigtramp_cache): Use register_size instead
	of DEPRECATED_REGISTER_RAW_SIZE.
	(arm_register_type): Add gdbarch argument.
	(arm_register_raw_size, arm_register_virtual_size): Delete.
	(arm_register_byte, arm_extract_return_value)
	(arm_store_return_value, arm_get_longjmp_target): Update references
	to INT_REGISTER_RAW_SIZE and FP_REGISTER_RAW_SIZE.
	(arm_gdbarch_init): Likewise.  Don't set
	deprecated_register_raw_size, deprecated_register_virtual_size,
	deprecated_max_register_raw_size,
	deprecated_max_register_virtual_size, or
	deprecated_max_register_virtual_type.  Do set register_type.
	* arm-tdep.h (ARM_MAX_REGISTER_RAW_SIZE)
	(ARM_MAX_REGISTER_VIRTUAL_SIZE, INT_REGISTER_VIRTUAL_SIZE)
	(FP_REGISTER_VIRTUAL_SIZE): Delete.
	(INT_REGISTER_RAW_SIZE): Rename to INT_REGISTER_SIZE.
	(FP_REGISTER_RAW_SIZE): Rename to FP_REGISTER_SIZE.
	* arm-linux-tdep.c (ARM_NBSD_JB_ELEMENT_SIZE): Define to
	INT_REGISTER_SIZE.
	* remote-rdp.c (remote_rdp_fetch_register): Use MAX_REGISTER_SIZE.
	(remote_rdp_store_register): Likewise.
2004-03-25 16:52:42 +00:00
Richard Earnshaw fd50bc42f4 * arm-tdep.h (arm_float_model): Add AUTO and LAST values.
(arm_get_fp_model): Declare.
* arm-tdep.c (fp_model_strings): New string array.
(arm_fp_model, current_fp_model): New variables.
(arm_get_fp_model): New function.
(arm_set_fp): New function.
(set_fp_model_sfunc): New function.
(show_fp_model): New function.
(_initialize_arm_tdep): Add new command to set/show the FPU.
(arm_extract_return_value): Use arm_get_fp_model.
(arm_store_return_value): Likewise.
(arm_gdbarch_init): Default fpa model is softfpa.  Call arm_set_fp
to initialize the floating-point data types.
* arm-linux-tdep.c (arm_linux_init_abi): The default floating point
model is FPA.
2003-03-22 20:39:21 +00:00
Daniel Jacobowitz 4be87837a2 * arch-utils.c (gdbarch_info_init): Set osabi to
GDB_OSABI_UNINITIALIZED.
	* gdbarch.sh: Add osabi to struct gdbarch and to struct
	gdbarch_info.  Include "osabi.h" in gdbarch.c.  Check osabi
	in gdbarch_list_lookup_by_info and in gdbarch_update_p.
	* gdbarch.c: Regenerated.
	* gdbarch.h: Regenerated.
	* osabi.c (gdbarch_lookup_osabi): Return GDB_OSABI_UNINITIALIZED if
	there's no BFD.
	(gdbarch_init_osabi): Remove osabi argument; use info.osabi.
	* osabi.h (enum gdb_osabi): Move to defs.h.
	(gdbarch_init_osabi): Update prototype.
	* defs.h (enum gdb_osabi): Moved here.
	* Makefile.in: Update dependencies.

Plus updates to alpha, arm, hppa, i386, mips, ns32k, ppc, sh, sparc, and vax
ports to match.
2003-01-04 23:38:46 +00:00
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
Richard Earnshaw 7bbcf28307 * arm-tdep.h (ARM_MAX_REGISTER_RAW_SIZE): Define.
(ARM_MAX_REGISTER_VIRTUAL_SIZE): Define.
* arm-tdep.c (arm_store_return_value): Use them.
Use FP_REGISTER_RAW_SIZE when setting the FPA return value.
* remote-rdp.c (remote_rdp_fetch_register): Use
ARM_MAX_REGISTER_RAW_SIZE.
(remote_rdp_store_register): Likewise.
2002-05-07 12:58:51 +00:00
Michael Snyder 47a73475e9 2002-04-18 Michael Snyder <msnyder@redhat.com>
* arm-tdep.h: Change regnum defines to enums for ease of debugging.
2002-04-22 22:46:40 +00:00
Richard Earnshaw 08216dd78d * arm-tdep.h (enum arm_float_model): New enum.
(struct gdbarch_tdep): Add fp_model.
* arm-tdep.c (arm_gdbarch_init): Set fp_model in tdep.  Defer setting
up floating-point conversions until we know the floating-point model
in use by the inferior.  Don't complain about being unable to
determine the ABI of the inferior when we don't have one.
(arm_extract_return_value): Support different floating-point models.
(arm_store_return_value): Likewise.
* armnbsd-tdep.c (arm_netbsd_aout_init_abi): Set fp_model in tdep to
ARM_FLOAT_SOFT.
(arm_netbsd_elf_init_abi): Set fp_model to ARM_FLOAT_SOFT_VFP.
2002-02-19 19:20:31 +00:00
Richard Earnshaw 9df628e0aa * gdbarch.sh (GET_LONGJMP_TARGET): Add rule.
* gdbarch.c gdbarch.h: Regenerate.
* breakpoint.c (create_longjmp_breakpoint): Always compile this
function.
(breakpoint_reset): Test GET_LONGJMP_TARGET_P().
* infrun.c (GET_LONGJMP_TARGET): Delete default definition.
(handle_inferior_event): Test GET_LONGJMP_TARGET_P().

* arm-tdep.h (struct gdbarch_tdep): Add jb_pc and jb_elt_size fields.
* arm-tdep.c (arm_get_longjmp_target): New function.
(arm_gdbarch_init): Initialize jb_pc to -1.  If ABI handler changes
this to a positive value register arm_get_longjmp_target as the
longjmp handler.
* arm-linux-tdep.c (arm_get_longjmp_target): Delete.
(arm_linux_init_abi): Set up longjmp description in tdep.
* armnbsd-nat.c (get_longjmp_target): Delete.
* armnbsd-tdep.c (arm_netbsd_init_abi_common): Set up longjmp
description in tdep.
* config/arm/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC): Delete.
(get_longjmp_target): Delete declaration.
(GET_LONGJMP_TARGET): Delete.
* config/arm/tm-linux.h (arm_get_longjmp_target): Delete declaration.
(GET_LONGJMP_TARGET): Delete.
2002-02-18 13:35:31 +00:00
Richard Earnshaw 66e810cd09 * arm-tdep.h (struct gdbarch_tdep): Add fields for breakpoint
descriptions.
* arm-tdep.c (arm_default_arm_le_breakpoint)
(arm_default_arm_be_breakpoint, arm_default_thumb_le_breakpoint)
(arm_default_thumb_be_breakpoint): New.  Initialize them from
traditional breakpoint defines.
(arm_breakpoint_from_pc): Use new gdbarch_tdep entries.
(arm_gdbarch_init): Initialize new breakpoint variables.
* arm-linux-tdep.c (arm_linux_arm_le_breakpoint): New.
(arm_linux_init_abi): Initialize linux-specific breakpoint.
* armnbsd-tdep.c (arm_nbsd_arm_le_breakpoint): New.
(arm_netbsd_aout_init_abi, arm_netbsd_elf_init_abi): Split common
code out to ...
(arm_netbsd_init_abi_common): ... here; new function.
* config/arm/tm-arm.h (ARM_LE_BREAKPOINT, ARM_BE_BREAKPOINT)
(THUMB_LE_BREAKPOINT, THUMB_BE_BREAKPOINT): Delete.
* config/arm/tm-linux.h (ARM_LE_BREAKPOINT): Delete.
* config/arm/tm-nbsd.h (ARM_LE_BREAKPOINT): Delete.
2002-02-15 16:12:24 +00:00
Richard Earnshaw 97e03143bb * arm-tdep.h (enum arm_abi): New enum.
(struct gdbarch_tdep): New structure.
(LOWEST_PC): Provide a default.
(arm_gdbarch_register_os_abi): Declare new function.
* arm-tdep.c (arm_abi_names): New array.
(process_note_abi_tag_sections): New function.
(get_elfosabi): New function.
(arm_gdbarch_register_os_abi): New function.
(arm_gdbarch_init): Try to determine the ABI of the inferior.  If
support for that ABI has been built in, then call the appropriate
configuration routine.  Use gdbarch_num_regs() to get the number
of registers.
(arm_dump_tdep): New function.
(arm_init_abi_eabi_v1, arm_init_abi_eabi_v2, arm_init_abi_apcs): New
place-holder functions.
(_initialize_arm_tdep): Register them.
* config/arm/tm-arm.h (LOWEST_PC): Delete.

* armnbsd-tdep.c: New file.
* Makefile.in (armnbsd-tdep.o): Add dependencies.
* config/arm/nbsd.mt (TDEPFILES): Add it.
* config/arm/tm-nbsd.h (LOWEST_PC): Delete.

* armnbsd-nat.c: Include regcache.h.
* Makefile.in (armnbsd-nat.o): Update dependency list.

* arm-tdep.c (arm_get_next_pc): Use printf_filtered for error message.
2002-02-15 13:35:27 +00:00
Keith Seitz 3e0b0f4890 * arm-tdep.h (arm_get_next_pc): Add declaration. 2002-02-13 17:09:07 +00:00
Richard Earnshaw 34e8f22ded * arm-tdep.h: New file.
* arm-tdep.c: Include arm-tdep.h.
(arm_addr_bits_remove, arm_smash_text_address, arm_saved_pc_after_call)
(arm_skip_prologue, arm_call_dummy_words, arm_fix_call_dummy)
(arm_print_float_info, arm_register_type, convert_to_extended)
(arm_elf_make_msymbols_special, arm_coff_make_msymbol_special)
(arm_extract_return_value, arm_register_name): Make static.
(arm_software_single_step): Similarly.  Fix types in declaration.
(arm_register_byte, arm_register_raw_size, arm_register_virtual_size)
(arm_store_return_value, arm_store_struct_return): New functions.
(arm_gdbarch_init): Register the above functions.  Also register
call_dummy_start_offset, sizeof_call_dummy_words,
function_start_offset, inner_than, decr_pc_after_break, fp_regnum,
sp_regnum, pc_regnum, register_bytes, num_regs, max_register_raw_size,
max_register_virtual_size, register_size.  Set up
prologue_cache.saved_regs here, rather than ...
(_initialize_arm_tdep): ... here.
* config/arm/tm-arm.h (struct type, struct value): Delete forward
declarations.
(arm_addr_bits_remove, arm_smash_text_address, arm_saved_pc_after_call)
(arm_skip_prologue, arm_call_dummy_words, arm_fix_call_dummy)
(arm_print_float_info, arm_register_type, convert_to_extended)
(arm_elf_make_msymbols_special, arm_coff_make_msymbol_special)
(arm_extract_return_value, arm_register_name): Delete declarations.
(SMASH_TEXT_ADDRESS, ADDR_BITS_REMOVE, FUNCTION_START_OFFSET)
(SKIP_PROLOGUE, SAVED_PC_AFTER_CALL, INNER_THAN, BREAKPOINT_FROM_PC)
(DECR_PC_AFTER_BREAK, PRINT_FLOAT_INFO, REGISTER_SIZE, NUM_REGS)
(REGISTER_NAME, REGISTER_BYTES, REGISTER_BYTE, REGISTER_RAW_SIZE)
(REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE)
(MAX_REGISTER_VIRTUAL_SIZE, REGISTER_VIRTUAL_TYPE, STORE_STRUCT_RETURN)
(EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE, CALL_DUMMY_WORDS)
(SIZEOF_CALL_DUMMY_WORDS, CALL_DUMMY_START_OFFSET, FIX_CALL_DUMMY)
(SOFTWARE_SINGLE_STEP_P, SOFTWARE_SINGLE_STEP)
(ELF_MAKE_MSYMBOL_SPECIAL, COFF_MAKE_MSYMBOL_SPECIAL) Delete.
(arm_pc_is_thumb, arm_pc_is_thumb_dummy, thumb_get_next_pc)
(arm_get_next_pc): No-longer static -- these are needed by the RDI
interface.
* arm-linux-nat.c arm-linux-tdep.c armnbsd-nat.c: Include arm-tdep.h.
* remote-rdi.c remote-rdp.c: Likewise.
* Makefile.in (arm-linux-nat.o, arm-linux-tdep.o arm-tdep.o)
(armnbsd-nat.o, remote-rdi.o, remote_rdp.o): Update dependencies.
* config/arm/tm-nbsd.h (SOFTWARE_SINGLE_STEP_P): Delete bogus
definition.

* arm-tdep.h (ARM_A1_REGNUM, ARM_A4_REGNUM, ARM_AP_REGNUM)
(ARM_SP_REGNUM, ARM_LR_REGNUM, ARM_PC_REGNUM, ARM_F0_REGNUM)
(ARM_F3_REGNUM, ARM_F7_REGNUM, ARM_FPS_REGNUM, ARM_PS_REGNUM): Renamed
from non-ARM_ prefixed definitions.
* arm-tdep.c armnbsd-nat.c arm-linux-nat.c arm-linux-tdep.c: Update
all uses of above.
* remote-rdi.c remote-rdp.c: Likewise.
* arm-linux-nat.c (ARM_CPSR_REGNUM): Renamed from CPSR_REGNUM.
2002-02-11 18:34:12 +00:00