GDB (API)
/home/stan/gdb/src/gdb/s390-tdep.h
Go to the documentation of this file.
00001 /* Target-dependent code for GDB, the GNU debugger.
00002    Copyright (C) 2003-2013 Free Software Foundation, Inc.
00003 
00004    This file is part of GDB.
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 3 of the License, or
00009    (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00018 
00019 #ifndef S390_TDEP_H
00020 #define S390_TDEP_H
00021 
00022 /* Hardware capabilities. */
00023 
00024 #ifndef HWCAP_S390_HIGH_GPRS
00025 #define HWCAP_S390_HIGH_GPRS 512
00026 #endif
00027 
00028 #ifndef HWCAP_S390_TE
00029 #define HWCAP_S390_TE 1024
00030 #endif
00031 
00032 /* Register information.  */
00033 
00034 /* Program Status Word.  */
00035 #define S390_PSWM_REGNUM 0
00036 #define S390_PSWA_REGNUM 1
00037 /* General Purpose Registers.  */
00038 #define S390_R0_REGNUM 2
00039 #define S390_R1_REGNUM 3
00040 #define S390_R2_REGNUM 4
00041 #define S390_R3_REGNUM 5
00042 #define S390_R4_REGNUM 6
00043 #define S390_R5_REGNUM 7
00044 #define S390_R6_REGNUM 8
00045 #define S390_R7_REGNUM 9
00046 #define S390_R8_REGNUM 10
00047 #define S390_R9_REGNUM 11
00048 #define S390_R10_REGNUM 12
00049 #define S390_R11_REGNUM 13
00050 #define S390_R12_REGNUM 14
00051 #define S390_R13_REGNUM 15
00052 #define S390_R14_REGNUM 16
00053 #define S390_R15_REGNUM 17
00054 /* Access Registers.  */
00055 #define S390_A0_REGNUM 18
00056 #define S390_A1_REGNUM 19
00057 #define S390_A2_REGNUM 20
00058 #define S390_A3_REGNUM 21
00059 #define S390_A4_REGNUM 22
00060 #define S390_A5_REGNUM 23
00061 #define S390_A6_REGNUM 24
00062 #define S390_A7_REGNUM 25
00063 #define S390_A8_REGNUM 26
00064 #define S390_A9_REGNUM 27
00065 #define S390_A10_REGNUM 28
00066 #define S390_A11_REGNUM 29
00067 #define S390_A12_REGNUM 30
00068 #define S390_A13_REGNUM 31
00069 #define S390_A14_REGNUM 32
00070 #define S390_A15_REGNUM 33
00071 /* Floating Point Control Word.  */
00072 #define S390_FPC_REGNUM 34
00073 /* Floating Point Registers.  */
00074 #define S390_F0_REGNUM 35
00075 #define S390_F1_REGNUM 36
00076 #define S390_F2_REGNUM 37
00077 #define S390_F3_REGNUM 38
00078 #define S390_F4_REGNUM 39
00079 #define S390_F5_REGNUM 40
00080 #define S390_F6_REGNUM 41
00081 #define S390_F7_REGNUM 42
00082 #define S390_F8_REGNUM 43
00083 #define S390_F9_REGNUM 44
00084 #define S390_F10_REGNUM 45
00085 #define S390_F11_REGNUM 46
00086 #define S390_F12_REGNUM 47
00087 #define S390_F13_REGNUM 48
00088 #define S390_F14_REGNUM 49
00089 #define S390_F15_REGNUM 50
00090 /* General Purpose Register Upper Halves.  */
00091 #define S390_R0_UPPER_REGNUM 51
00092 #define S390_R1_UPPER_REGNUM 52
00093 #define S390_R2_UPPER_REGNUM 53
00094 #define S390_R3_UPPER_REGNUM 54
00095 #define S390_R4_UPPER_REGNUM 55
00096 #define S390_R5_UPPER_REGNUM 56
00097 #define S390_R6_UPPER_REGNUM 57
00098 #define S390_R7_UPPER_REGNUM 58
00099 #define S390_R8_UPPER_REGNUM 59
00100 #define S390_R9_UPPER_REGNUM 60
00101 #define S390_R10_UPPER_REGNUM 61
00102 #define S390_R11_UPPER_REGNUM 62
00103 #define S390_R12_UPPER_REGNUM 63
00104 #define S390_R13_UPPER_REGNUM 64
00105 #define S390_R14_UPPER_REGNUM 65
00106 #define S390_R15_UPPER_REGNUM 66
00107 /* GNU/Linux-specific optional registers.  */
00108 #define S390_ORIG_R2_REGNUM 67
00109 #define S390_LAST_BREAK_REGNUM 68
00110 #define S390_SYSTEM_CALL_REGNUM 69
00111 /* Transaction diagnostic block.  */
00112 #define S390_TDB_DWORD0_REGNUM 70
00113 #define S390_TDB_ABORT_CODE_REGNUM 71
00114 #define S390_TDB_CONFLICT_TOKEN_REGNUM 72
00115 #define S390_TDB_ATIA_REGNUM 73
00116 #define S390_TDB_R0_REGNUM 74
00117 #define S390_TDB_R1_REGNUM 75
00118 #define S390_TDB_R2_REGNUM 76
00119 #define S390_TDB_R3_REGNUM 77
00120 #define S390_TDB_R4_REGNUM 78
00121 #define S390_TDB_R5_REGNUM 79
00122 #define S390_TDB_R6_REGNUM 80
00123 #define S390_TDB_R7_REGNUM 81
00124 #define S390_TDB_R8_REGNUM 82
00125 #define S390_TDB_R9_REGNUM 83
00126 #define S390_TDB_R10_REGNUM 84
00127 #define S390_TDB_R11_REGNUM 85
00128 #define S390_TDB_R12_REGNUM 86
00129 #define S390_TDB_R13_REGNUM 87
00130 #define S390_TDB_R14_REGNUM 88
00131 #define S390_TDB_R15_REGNUM 89
00132 /* Total.  */
00133 #define S390_NUM_REGS 90
00134 
00135 /* Special register usage.  */
00136 #define S390_SP_REGNUM S390_R15_REGNUM
00137 #define S390_RETADDR_REGNUM S390_R14_REGNUM
00138 #define S390_FRAME_REGNUM S390_R11_REGNUM
00139 
00140 #define S390_IS_GREGSET_REGNUM(i)                                       \
00141   (((i) >= S390_PSWM_REGNUM && (i) <= S390_A15_REGNUM)                  \
00142    || ((i) >= S390_R0_UPPER_REGNUM && (i) <= S390_R15_UPPER_REGNUM)     \
00143    || (i) == S390_ORIG_R2_REGNUM)
00144 
00145 #define S390_IS_FPREGSET_REGNUM(i)                      \
00146   ((i) >= S390_FPC_REGNUM && (i) <= S390_F15_REGNUM)
00147 
00148 #define S390_IS_TDBREGSET_REGNUM(i)                             \
00149   ((i) >= S390_TDB_DWORD0_REGNUM && (i) <= S390_TDB_R15_REGNUM)
00150 
00151 /* Core file register sets, defined in s390-tdep.c.  */
00152 #define s390_sizeof_gregset 0x90
00153 extern const short s390_regmap_gregset[];
00154 #define s390x_sizeof_gregset 0xd8
00155 extern const short s390x_regmap_gregset[];
00156 #define s390_sizeof_fpregset 0x88
00157 extern const short s390_regmap_fpregset[];
00158 extern const short s390_regmap_last_break[];
00159 extern const short s390x_regmap_last_break[];
00160 extern const short s390_regmap_system_call[];
00161 extern const short s390_regmap_tdb[];
00162 #define s390_sizeof_tdbregset 0x100
00163 
00164 /* GNU/Linux target descriptions.  */
00165 extern struct target_desc *tdesc_s390_linux32;
00166 extern struct target_desc *tdesc_s390_linux32v1;
00167 extern struct target_desc *tdesc_s390_linux32v2;
00168 extern struct target_desc *tdesc_s390_linux64;
00169 extern struct target_desc *tdesc_s390_linux64v1;
00170 extern struct target_desc *tdesc_s390_linux64v2;
00171 extern struct target_desc *tdesc_s390_te_linux64;
00172 extern struct target_desc *tdesc_s390x_linux64;
00173 extern struct target_desc *tdesc_s390x_linux64v1;
00174 extern struct target_desc *tdesc_s390x_linux64v2;
00175 extern struct target_desc *tdesc_s390x_te_linux64;
00176 
00177 #endif
00178 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines