diff options
author | Philipp Rudo <prudo@linux.vnet.ibm.com> | 2018-01-23 13:37:43 +0100 |
---|---|---|
committer | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2018-01-23 13:37:43 +0100 |
commit | d6e5894564754ed81faaa3dc92f0cc0e90d7994b (patch) | |
tree | b732944e1ec2ca1a2137b5b63ed8510c78bd0f53 /gdb/s390-linux-tdep.h | |
parent | s390: gdbarch_tdep add hook for syscall record (diff) | |
download | binutils-gdb-d6e5894564754ed81faaa3dc92f0cc0e90d7994b.tar.gz binutils-gdb-d6e5894564754ed81faaa3dc92f0cc0e90d7994b.tar.bz2 binutils-gdb-d6e5894564754ed81faaa3dc92f0cc0e90d7994b.zip |
s390: Split up s390-linux-tdep.c into two files
Currently all target dependent code for s390 is in one file,
s390-linux-tdep.c. This includes code general for the architecture as
well as code specific for uses in GNU/Linux (user space). Up until now
this was OK as GNU/Linux was the only supported OS. In preparation to
support the new Linux kernel 'OS' split up the existing s390 code into a
general s390-tdep and a GNU/Linux-specific s390-linux-tdep.
Note: The record-replay feature will be moved in a separate patch. This
is simply due to the fact that the combined patch would be too large for
the mailing list. This requires setting the process_record hook during
OSABI init to keep the code bisectable. The patch moving record-replay
cleans up this hack.
gdb/ChangeLog:
* s390-linux-nat.c (s390-tdep.h): New include.
* Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
(HFILES_NO_SRCDIR): Add s390-tdep.h.
(ALLDEPFILES): Add s390-tdep.c.
* configure.tgt (s390*-*-linux*): Add s390-tdep.o.
* s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
* s390-tdep.h: ...this. New file.
* s390-linux-tdep.c (s390-tdep.h): New include.
(_initialize_s390_tdep): Rename to...
(_initialize_s390_linux_tdep): ...this and adjust.
(s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
(enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
s390-tdep.h.
(s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
(is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
(s390_is_partial_instruction, s390_software_single_step)
(is_non_branch_ril, s390_displaced_step_copy_insn)
(s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
(s390_prologue_data, s390_addr, s390_store, s390_load)
(s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
(s390_register_call_saved, s390_guess_tracepoint_registers)
(s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
(regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
(s390_pseudo_register_name, s390_pseudo_register_type)
(s390_pseudo_register_read, s390_pseudo_register_write)
(s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
(s390_ax_pseudo_register_push_stack, s390_gen_return_address)
(s390_addr_bits_remove, s390_address_class_type_flags)
(s390_address_class_type_flags_to_name)
(s390_address_class_name_to_type_flags, s390_effective_inner_type)
(s390_function_arg_float, s390_function_arg_vector)
(is_power_of_two, s390_function_arg_integer, s390_arg_state)
(s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
(s390_frame_align, s390_register_return_value, s390_return_value)
(s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
(s390_unwind_pseudo_register, s390_adjust_frame_regnum)
(s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
(s390_trad_frame_prev_register, s390_unwind_cache)
(s390_prologue_frame_unwind_cache)
(s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
(s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
(s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
(s390_stub_frame_this_id, s390_stub_frame_prev_register)
(s390_stub_frame_sniffer, s390_stub_frame_unwind)
(s390_frame_base_address, s390_local_base_address)
(s390_frame_base, s390_gcc_target_options)
(s390_gnu_triplet_regexp, s390_stap_is_single_operand)
(s390_validate_reg_range, s390_tdesc_valid)
(s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
* s390-tdep.c: ...this. New file.
Diffstat (limited to 'gdb/s390-linux-tdep.h')
-rw-r--r-- | gdb/s390-linux-tdep.h | 176 |
1 files changed, 6 insertions, 170 deletions
diff --git a/gdb/s390-linux-tdep.h b/gdb/s390-linux-tdep.h index ea7ace46dd8..65424649519 100644 --- a/gdb/s390-linux-tdep.h +++ b/gdb/s390-linux-tdep.h @@ -1,4 +1,5 @@ -/* Target-dependent code for GDB, the GNU debugger. +/* Target-dependent code for GNU/Linux on s390. + Copyright (C) 2003-2018 Free Software Foundation, Inc. This file is part of GDB. @@ -16,173 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef S390_TDEP_H -#define S390_TDEP_H - -/* Hardware capabilities. */ - -#ifndef HWCAP_S390_HIGH_GPRS -#define HWCAP_S390_HIGH_GPRS 512 -#endif - -#ifndef HWCAP_S390_TE -#define HWCAP_S390_TE 1024 -#endif - -#ifndef HWCAP_S390_VX -#define HWCAP_S390_VX 2048 -#endif - -#ifndef HWCAP_S390_GS -#define HWCAP_S390_GS 16384 -#endif - -/* 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 -/* General Purpose Register Upper Halves. */ -#define S390_R0_UPPER_REGNUM 51 -#define S390_R1_UPPER_REGNUM 52 -#define S390_R2_UPPER_REGNUM 53 -#define S390_R3_UPPER_REGNUM 54 -#define S390_R4_UPPER_REGNUM 55 -#define S390_R5_UPPER_REGNUM 56 -#define S390_R6_UPPER_REGNUM 57 -#define S390_R7_UPPER_REGNUM 58 -#define S390_R8_UPPER_REGNUM 59 -#define S390_R9_UPPER_REGNUM 60 -#define S390_R10_UPPER_REGNUM 61 -#define S390_R11_UPPER_REGNUM 62 -#define S390_R12_UPPER_REGNUM 63 -#define S390_R13_UPPER_REGNUM 64 -#define S390_R14_UPPER_REGNUM 65 -#define S390_R15_UPPER_REGNUM 66 -/* GNU/Linux-specific optional registers. */ -#define S390_ORIG_R2_REGNUM 67 -#define S390_LAST_BREAK_REGNUM 68 -#define S390_SYSTEM_CALL_REGNUM 69 -/* Transaction diagnostic block. */ -#define S390_TDB_DWORD0_REGNUM 70 -#define S390_TDB_ABORT_CODE_REGNUM 71 -#define S390_TDB_CONFLICT_TOKEN_REGNUM 72 -#define S390_TDB_ATIA_REGNUM 73 -#define S390_TDB_R0_REGNUM 74 -#define S390_TDB_R1_REGNUM 75 -#define S390_TDB_R2_REGNUM 76 -#define S390_TDB_R3_REGNUM 77 -#define S390_TDB_R4_REGNUM 78 -#define S390_TDB_R5_REGNUM 79 -#define S390_TDB_R6_REGNUM 80 -#define S390_TDB_R7_REGNUM 81 -#define S390_TDB_R8_REGNUM 82 -#define S390_TDB_R9_REGNUM 83 -#define S390_TDB_R10_REGNUM 84 -#define S390_TDB_R11_REGNUM 85 -#define S390_TDB_R12_REGNUM 86 -#define S390_TDB_R13_REGNUM 87 -#define S390_TDB_R14_REGNUM 88 -#define S390_TDB_R15_REGNUM 89 -/* Vector registers. */ -#define S390_V0_LOWER_REGNUM 90 -#define S390_V1_LOWER_REGNUM 91 -#define S390_V2_LOWER_REGNUM 92 -#define S390_V3_LOWER_REGNUM 93 -#define S390_V4_LOWER_REGNUM 94 -#define S390_V5_LOWER_REGNUM 95 -#define S390_V6_LOWER_REGNUM 96 -#define S390_V7_LOWER_REGNUM 97 -#define S390_V8_LOWER_REGNUM 98 -#define S390_V9_LOWER_REGNUM 99 -#define S390_V10_LOWER_REGNUM 100 -#define S390_V11_LOWER_REGNUM 101 -#define S390_V12_LOWER_REGNUM 102 -#define S390_V13_LOWER_REGNUM 103 -#define S390_V14_LOWER_REGNUM 104 -#define S390_V15_LOWER_REGNUM 105 -#define S390_V16_REGNUM 106 -#define S390_V17_REGNUM 107 -#define S390_V18_REGNUM 108 -#define S390_V19_REGNUM 109 -#define S390_V20_REGNUM 110 -#define S390_V21_REGNUM 111 -#define S390_V22_REGNUM 112 -#define S390_V23_REGNUM 113 -#define S390_V24_REGNUM 114 -#define S390_V25_REGNUM 115 -#define S390_V26_REGNUM 116 -#define S390_V27_REGNUM 117 -#define S390_V28_REGNUM 118 -#define S390_V29_REGNUM 119 -#define S390_V30_REGNUM 120 -#define S390_V31_REGNUM 121 -#define S390_GSD_REGNUM 122 -#define S390_GSSM_REGNUM 123 -#define S390_GSEPLA_REGNUM 124 -#define S390_BC_GSD_REGNUM 125 -#define S390_BC_GSSM_REGNUM 126 -#define S390_BC_GSEPLA_REGNUM 127 -/* Total. */ -#define S390_NUM_REGS 128 - -/* Special register usage. */ -#define S390_SP_REGNUM S390_R15_REGNUM -#define S390_RETADDR_REGNUM S390_R14_REGNUM -#define S390_FRAME_REGNUM S390_R11_REGNUM +#ifndef S390_LINUX_TDEP_H +#define S390_LINUX_TDEP_H #define S390_IS_GREGSET_REGNUM(i) \ (((i) >= S390_PSWM_REGNUM && (i) <= S390_A15_REGNUM) \ @@ -195,7 +31,7 @@ #define S390_IS_TDBREGSET_REGNUM(i) \ ((i) >= S390_TDB_DWORD0_REGNUM && (i) <= S390_TDB_R15_REGNUM) -/* Core file register sets, defined in s390-tdep.c. */ +/* Core file register sets, defined in s390-linux-tdep.c. */ #define s390_sizeof_gregset 0x90 #define s390x_sizeof_gregset 0xd8 extern const struct regset s390_gregset; @@ -230,4 +66,4 @@ extern struct target_desc *tdesc_s390x_vx_linux64; extern struct target_desc *tdesc_s390x_tevx_linux64; extern struct target_desc *tdesc_s390x_gs_linux64; -#endif +#endif /* S390_LINUX_TDEP_H */ |