binutils-gdb/gdb/s390-tdep.h

106 lines
3.1 KiB
C
Raw Normal View History

2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. Do not include "solib.h". (KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove. (FETCH_INFERIOR_REGISTERS): Define. * config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and core-regset.o. * config/s390/s390x.mt: Remove. * config/s390/tm-s390.h: Remove. * config/s390/tm-linux.h: Do not include "s390/tm-s390.h". (TARGET_ELF64): Remove. (SKIP_TRAMPOLINE_CODE): Do not undefine. * configure.tgt [s390-*-*, s390x-*-*]: Merge into single s390*-*-* case; always set gdb_target to s390. * regformats/reg-s390.dat: Remove control registers. * regformats/reg-s390x.dat: Likewise. * s390-tdep.h: New file. * s390-nat.c: Do not include <asm/processor.h> or <value.h>. Include "inferior.h" and "s390-tdep.h". Remove private definition of offsetof. (s390_register_u_addr): Remove. (regmap_gregset, regmap_fpregset): Define. (supply_gregset, fill_gregset): Reimplement. (supply_fpregset, fill_fpregset): Likewise. (s390_inferior_tid): New function. (fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise. (fetch_inferior_registers, store_inferior_registers): Likewise. * s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h". Global replace of S390_GP0_REGNUM by S390_R0_REGNUM. Global replace of S390_FP0_REGNUM by S390_F0_REGNUM. (struct gdbarch_tdep): Define. (struct s390_register_info): Define. (s390_register_info): New variable. (s390_register_name): Reimplement. (s390_register_type): New function. (s390_register_raw_size, s390x_register_raw_size): Remove. (s390_cannot_fetch_register): Remove. (s390_register_byte): Remove. (s390_register_virtual_type, s390x_register_virtual_type): Remove. (s390_dwarf_regmap): New variable. (s390_dwarf_reg_to_regnum): New function. (s390_stab_reg_to_regnum): Remove. (s390_pseudo_register_read, s390_pseudo_register_write): New functions. (s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise. (s390_convert_register_p): Likewise. (s390_register_to_value, s390_value_to_register): Likewise. (s390_register_reggroup_p): Likewise. (s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset, s390_gregset, s390x_gregset, s390_fpregset): New variables. (s390_supply_regset, s390_regset_from_core_section): New functions. (GDB_TARGET_IS_ESAME): Move here from tm-s390.h. (S390_FPR_SIZE): Likewise. (S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME. Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE. (S390_NUM_GPRS): Move here from tm-s390.h. (S390_NUM_FPRS): Likewise. (s390_in_function_epilogue_p): New function. (s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE. Replace S390_PC_REGNUM by S390_PSWA_REGNUM. (s390_gdbarch_init): Allocate and set up gdbarch_tdep structure. Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum. Replace S390_FP_REGNUM by S390_SP_REGNUM. Remove calls to: set_gdbarch_deprecated_max_register_raw_size, set_gdbarch_deprecated_max_register_virtual_size, set_gdbarch_deprecated_register_byte, set_gdbarch_cannot_fetch_register, set_gdbarch_cannot_store_register, set_gdbarch_deprecated_register_size, set_gdbarch_deprecated_register_raw_size, set_gdbarch_deprecated_register_virtual_size, set_gdbarch_deprecated_register_virtual_type, set_gdbarch_deprecated_register_bytes. Add calls to: set_gdbarch_num_pseudo_regs, set_gdbarch_register_type, set_gdbarch_convert_register_p, set_gdbarch_register_to_value, set_gdbarch_value_to_register, set_gdbarch_register_reggroup_p, set_gdbarch_regset_from_core_section, set_gdbarch_pseudo_register_read, set_gdbarch_pseudo_register_write, set_gdbarch_in_function_epilogue_p. * Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies. (s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
/* Target-dependent code for GDB, the GNU debugger.
Copyright 2003 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef S390_TDEP_H
#define S390_TDEP_H
/* Register information. */
/* Program Status Word. */
#define S390_PSWM_REGNUM 0
#define S390_PSWA_REGNUM 1
/* General Purpose Registers. */
#define S390_R0_REGNUM 2
#define S390_R1_REGNUM 3
#define S390_R2_REGNUM 4
#define S390_R3_REGNUM 5
#define S390_R4_REGNUM 6
#define S390_R5_REGNUM 7
#define S390_R6_REGNUM 8
#define S390_R7_REGNUM 9
#define S390_R8_REGNUM 10
#define S390_R9_REGNUM 11
#define S390_R10_REGNUM 12
#define S390_R11_REGNUM 13
#define S390_R12_REGNUM 14
#define S390_R13_REGNUM 15
#define S390_R14_REGNUM 16
#define S390_R15_REGNUM 17
/* Access Registers. */
#define S390_A0_REGNUM 18
#define S390_A1_REGNUM 19
#define S390_A2_REGNUM 20
#define S390_A3_REGNUM 21
#define S390_A4_REGNUM 22
#define S390_A5_REGNUM 23
#define S390_A6_REGNUM 24
#define S390_A7_REGNUM 25
#define S390_A8_REGNUM 26
#define S390_A9_REGNUM 27
#define S390_A10_REGNUM 28
#define S390_A11_REGNUM 29
#define S390_A12_REGNUM 30
#define S390_A13_REGNUM 31
#define S390_A14_REGNUM 32
#define S390_A15_REGNUM 33
/* Floating Point Control Word. */
#define S390_FPC_REGNUM 34
/* Floating Point Registers. */
#define S390_F0_REGNUM 35
#define S390_F1_REGNUM 36
#define S390_F2_REGNUM 37
#define S390_F3_REGNUM 38
#define S390_F4_REGNUM 39
#define S390_F5_REGNUM 40
#define S390_F6_REGNUM 41
#define S390_F7_REGNUM 42
#define S390_F8_REGNUM 43
#define S390_F9_REGNUM 44
#define S390_F10_REGNUM 45
#define S390_F11_REGNUM 46
#define S390_F12_REGNUM 47
#define S390_F13_REGNUM 48
#define S390_F14_REGNUM 49
#define S390_F15_REGNUM 50
/* Total. */
#define S390_NUM_REGS 51
/* Pseudo registers -- PC and condition code. */
#define S390_PC_REGNUM S390_NUM_REGS
#define S390_CC_REGNUM (S390_NUM_REGS+1)
#define S390_NUM_PSEUDO_REGS 2
#define S390_NUM_TOTAL_REGS (S390_NUM_REGS+2)
/* Special register usage. */
#define S390_SP_REGNUM S390_R15_REGNUM
#define S390_RETADDR_REGNUM S390_R14_REGNUM
#define S390_FRAME_REGNUM S390_R11_REGNUM
/* Core file register sets, defined in s390-tdep.c. */
#define s390_sizeof_gregset 0x90
extern int s390_regmap_gregset[S390_NUM_REGS];
#define s390x_sizeof_gregset 0xd8
extern int s390x_regmap_gregset[S390_NUM_REGS];
#define s390_sizeof_fpregset 0x88
extern int s390_regmap_fpregset[S390_NUM_REGS];
#endif