aboutsummaryrefslogtreecommitdiff
path: root/gdb/s390-tdep.h
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2013-09-13 14:17:31 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2013-09-13 14:17:31 +0000
commit4ac33720d6022079e8b038e795e40f0e06a4012c (patch)
treed8f025080163d46f3730e61fae2a14b59654f68e /gdb/s390-tdep.h
parent2ccd146855365598ad2644ef8139f2f2a6747b90 (diff)
downloadgdb-4ac33720d6022079e8b038e795e40f0e06a4012c.zip
gdb-4ac33720d6022079e8b038e795e40f0e06a4012c.tar.gz
gdb-4ac33720d6022079e8b038e795e40f0e06a4012c.tar.bz2
gdb/ChangeLog:
2013-09-13 Andreas Arnez <arnez@linux.vnet.ibm.com> * NEWS: Mention TDB support. * features/s390-tdb.xml: New file. * features/s390-te-linux64.xml: New file. * features/s390x-te-linux64.xml: New file. * features/Makefile (WHICH): Add new tdescs above. (s390-te-linux64-expedite): Set. (s390x-te-linux64-expedite): Set. * features/s390-te-linux64.c: New file (generated). * features/s390x-te-linux64.c: New file (generated). * regformats/s390-te-linux64.dat: New file (generated). * regformats/s390x-te-linux64.dat: New file (generated). * s390-tdep.h (HWCAP_S390_HIGH_GPRS): Define. (HWCAP_S390_TE): Likewise. (S390_TDB_DWORD0_REGNUM): Likewise. (S390_TDB_DWORD0_REGNUM): Likewise. (S390_TDB_ABORT_CODE_REGNUM): Likewise. (S390_TDB_CONFLICT_TOKEN_REGNUM): Likewise. (S390_TDB_ATIA_REGNUM): Likewise. (S390_TDB_R0_REGNUM): Likewise. (S390_TDB_R1_REGNUM): Likewise. (S390_TDB_R2_REGNUM): Likewise. (S390_TDB_R3_REGNUM): Likewise. (S390_TDB_R4_REGNUM): Likewise. (S390_TDB_R5_REGNUM): Likewise. (S390_TDB_R6_REGNUM): Likewise. (S390_TDB_R7_REGNUM): Likewise. (S390_TDB_R8_REGNUM): Likewise. (S390_TDB_R9_REGNUM): Likewise. (S390_TDB_R10_REGNUM): Likewise. (S390_TDB_R11_REGNUM): Likewise. (S390_TDB_R12_REGNUM): Likewise. (S390_TDB_R13_REGNUM): Likewise. (S390_TDB_R14_REGNUM): Likewise. (S390_TDB_R15_REGNUM): Likewise. (S390_NUM_REGS): Increase. (S390_IS_TDBREGSET_REGNUM): New macro. (s390_regmap_tdb): Declare. (s390_sizeof_tdbregset): Define. (tdesc_s390_te_linux64): Declare. (tdesc_s390x_te_linux64): Likewise. * s390-tdep.c: Add includes for "auxv.h", <elf.h>, "features/s390-te-linux64.c", and "features/s390x-te-linux64.c". (s390_regmap_tdb): New regmap. (s390_supply_tdb_regset): New function. (s390_tdb_regset): New regset. (s390_linux64v2_regset_sections): Add TDB regset to list. (s390x_linux64v2_regset_sections): Likewise. (s390_regset_from_core_section): Recognize TDB core note section. (s390_core_read_description): If HWCAP indicates TE support, select tdesc_s390_te_linux64 or tdesc_s390_s390x_te_linux64. (s390_gdbarch_init): Handle TDB regset. (_initialize_s390_tdep): Initialize new tdescs. * s390-nat.c (HWCAP_S390_HIGH_GPRS): Remove define. (have_regset_tdb): New variable. (s390_native_supply): Support register invalidation. (fetch_regset): Invalidate registers if ptrace yields ENODATA. (check_regset): Treat ENODATA as "regset exists". (s390_linux_fetch_inferior_registers): Add TDB. (s390_read_description): Check for TDB existence and select appropriate tdesc. * gdbserver/Makefile.in (clean): Add removal of new makefile targets. (s390-te-linux64.c): New makefile target. (s390x-te-linux64.c): Likewise. * gdbserver/configure.srv (srv_regobj): Append new objects s390-te-linux64.o and s390x-te-linux64.o. (srv_xmlfiles): Append new files s390-te-linux64.xml, s390x-te-linux64.xml, and s390-tdb.xml. * gdbserver/linux-s390-low.c (init_registers_s390_te_linux64): New declaration. (tdesc_s390_te_linux64): Likewise. (init_registers_s390x_te_linux64): Likewise. (tdesc_s390x_te_linux64): Likewise. (s390_check_regset): Treat ENODATA as "regset exists". (s390_arch_setup): Add TDB regset support. (initialize_low_arch): Initialize registers for new tdescs. gdb/doc/ChangeLog: 2013-09-13 Andreas Arnez <arnez@linux.vnet.ibm.com> * gdb.texinfo (Decimal Floating Point format): Mention S/390. (Standard Target Features): Add new node to menu. (S/390 and System z Features): New node. gdb/testsuite/ChangeLog: 2013-09-13 Andreas Arnez <arnez@linux.vnet.ibm.com> * gdb.arch/s390-tdbregs.c: New file. * gdb.arch/s390-tdbregs.exp: New file.
Diffstat (limited to 'gdb/s390-tdep.h')
-rw-r--r--gdb/s390-tdep.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/gdb/s390-tdep.h b/gdb/s390-tdep.h
index a262b64..69055e1 100644
--- a/gdb/s390-tdep.h
+++ b/gdb/s390-tdep.h
@@ -19,6 +19,16 @@
#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
+
/* Register information. */
/* Program Status Word. */
@@ -98,8 +108,29 @@
#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
/* Total. */
-#define S390_NUM_REGS 70
+#define S390_NUM_REGS 90
/* Special register usage. */
#define S390_SP_REGNUM S390_R15_REGNUM
@@ -114,6 +145,9 @@
#define S390_IS_FPREGSET_REGNUM(i) \
((i) >= S390_FPC_REGNUM && (i) <= S390_F15_REGNUM)
+#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. */
#define s390_sizeof_gregset 0x90
extern const short s390_regmap_gregset[];
@@ -124,6 +158,8 @@ extern const short s390_regmap_fpregset[];
extern const short s390_regmap_last_break[];
extern const short s390x_regmap_last_break[];
extern const short s390_regmap_system_call[];
+extern const short s390_regmap_tdb[];
+#define s390_sizeof_tdbregset 0x100
/* GNU/Linux target descriptions. */
extern struct target_desc *tdesc_s390_linux32;
@@ -132,9 +168,11 @@ extern struct target_desc *tdesc_s390_linux32v2;
extern struct target_desc *tdesc_s390_linux64;
extern struct target_desc *tdesc_s390_linux64v1;
extern struct target_desc *tdesc_s390_linux64v2;
+extern struct target_desc *tdesc_s390_te_linux64;
extern struct target_desc *tdesc_s390x_linux64;
extern struct target_desc *tdesc_s390x_linux64v1;
extern struct target_desc *tdesc_s390x_linux64v2;
+extern struct target_desc *tdesc_s390x_te_linux64;
#endif