aboutsummaryrefslogtreecommitdiff
path: root/gdb/features
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2010-01-04 15:03:01 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2010-01-04 15:03:01 +0000
commit7803799a0fb31a9d332cd3bf3547309debea010b (patch)
tree25069dfa82ff65c3340e823fc26a45de7ab2dd2a /gdb/features
parent1b1818e443eb8f134e0bc2f5ec950c8a16df6883 (diff)
downloadgdb-7803799a0fb31a9d332cd3bf3547309debea010b.zip
gdb-7803799a0fb31a9d332cd3bf3547309debea010b.tar.gz
gdb-7803799a0fb31a9d332cd3bf3547309debea010b.tar.bz2
* features/Makefile (WHICH): Add s390-linux32, s390-linux64,
and s390x-linux64. (s390-linux32-expedite): Define. (s390-linux64-expedite): Define. (s390x-linux64-expedite): Define. * features/s390-acr.xml: New file. * features/s390-fpr.xml: New file. * features/s390-core32.xml: New file. * features/s390-core64.xml: New file. * features/s390x-core64.xml: New file. * features/s390-linux32.xml: New file. * features/s390-linux64.xml: New file. * features/s390x-linux64.xml: New file. * features/s390-linux32.c: New generated file. * features/s390-linux64.c: New generated file. * features/s390x-linux64.c: New generated file. * regformats/s390-linux32.dat: New generated file. * regformats/s390-linux64.dat: New generated file. * regformats/s390x-linux64.dat: New generated file. * regformats/reg-s390.dat: Remove. * regformats/reg-s390x.dat: Remove. * s390-nat.c: Include "auxv.h" and <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (s390_target_wordsize): New function. (s390_auxv_parse): Likewise. (s390_get_hwcap): Likewise. (s390_read_description): Likewise. (_initialize_s390_nat): Install s390_auxv_parse and s390_read_description. * s390-tdep.c: Include "features/s390-linux32.c", "features/s390-linux64.c", and "features/s390x-linux64.c". (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum. (s390_register_call_saved): New function. (s390_register_name): Remove. (s390_register_type): Remove. (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums. (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs. (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI. (s390_pseudo_register_name): New function. (s390_pseudo_register_type): New function. (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases. Handle full GPR pesudos and varying pseudo register numbers. (s390_pseudo_register_write): Likewise (s390x_pseudo_register_read): Remove. (s390x_pseudo_register_write): Likewise. (s390_register_group): Remove. (s390_pseudo_register_group): New function. (s390_regmap_gregset): Add GPR upper halves. (s390x_regmap_gregset): Likewise. (s390_regmap_fpregset): Likewise. (s390_regmap_upper): New global variable. (s390_upper_regset): New global variable. (s390_upper_regset_sections): New global variable. (s390_regset_from_core_section): Handle GPR upper halves. (s390_core_read_description): New function. (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. (s390_backchain_frame_unwind_cache): Likewise. (s390_frame_prev_register): Unwind full GPRs to show lower halves. (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers. (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as PC and CC pseudos. Unwind upper halves and full GPRs as appropriate. Handle varying pseudo register numbers. (s390_unwind_pc): Handle varying pseudo register numbers. (s390_dwarf2_prev_register): New function. (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered register information. Handle varying pseudo register numbers. Install s390_dwarf2_prev_register to unwind full GPRs. (s390_gdbarch_init): Handle target descriptions. Assign varying pseudo register numbers. Install s390_adjust_frame_regnum. (_initialize_s390_tdep): Initialize target descriptions. * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define. (S390_NUM_REGS): Redefine to include upper half registers. (S390_PC_REGNUM, S390_CC_REGNUM): Remove. (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise. (tdesc_s390_linux32): Add declaration. (tdesc_s390_linux64): Likewise. (tdesc_s390x_linux64): Likewise. gdb/testsuite/ * gdb.xml/tdesc-regs.exp: Support s390*-*-* targets. gdbserver/ * Makefile.in (clean): Remove new generated files. (reg-s390.o, reg-s390.c): Remove rules. (reg-s390x.o, reg-s390x.c): Likewise. (s390-linux32.o, s390-linux32.c): Add rules. (s390-linux64.o, s390-linux64.c): Likewise. (s390x-linux64.o, s390x-linux64.c): Likewise. * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles. * linux-s390-low.c: Include <elf.h>. (HWCAP_S390_HIGH_GPRS): Define if undefined. (init_registers_s390): Remove prototype. (init_registers_s390x): Likewise. (init_registers_s390_linux32): Add prototype. (init_registers_s390_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (s390_num_regs_3264): New define. (s390_regmap_3264): New global variable. (s390_cannot_fetch_register): Remove obsolete check. (s390_cannot_store_register): Likewise. (s390_collect_ptrace_register): Handle upper/lower register halves. (s390_supply_ptrace_register): Likewise. (s390_fill_gregset): Update to register number changes. (s390_get_hwcap): New routine. (s390_arch_setup): Detect 32-bit process running on 64-bit system. Install appropriate regmap and register set.
Diffstat (limited to 'gdb/features')
-rw-r--r--gdb/features/Makefile6
-rw-r--r--gdb/features/s390-acr.xml26
-rw-r--r--gdb/features/s390-core32.xml28
-rw-r--r--gdb/features/s390-core64.xml45
-rw-r--r--gdb/features/s390-fpr.xml27
-rw-r--r--gdb/features/s390-linux32.c74
-rw-r--r--gdb/features/s390-linux32.xml17
-rw-r--r--gdb/features/s390-linux64.c90
-rw-r--r--gdb/features/s390-linux64.xml17
-rw-r--r--gdb/features/s390x-core64.xml28
-rw-r--r--gdb/features/s390x-linux64.c74
-rw-r--r--gdb/features/s390x-linux64.xml16
12 files changed, 447 insertions, 1 deletions
diff --git a/gdb/features/Makefile b/gdb/features/Makefile
index 5b1e691..8aa553e 100644
--- a/gdb/features/Makefile
+++ b/gdb/features/Makefile
@@ -34,7 +34,8 @@ WHICH = arm-with-iwmmxt arm-with-vfpv2 arm-with-vfpv3 arm-with-neon \
mips-linux mips64-linux \
rs6000/powerpc-32l rs6000/powerpc-altivec32l rs6000/powerpc-e500l \
rs6000/powerpc-64l rs6000/powerpc-altivec64l rs6000/powerpc-vsx32l \
- rs6000/powerpc-vsx64l rs6000/powerpc-cell32l rs6000/powerpc-cell64l
+ rs6000/powerpc-vsx64l rs6000/powerpc-cell32l rs6000/powerpc-cell64l \
+ s390-linux32 s390-linux64 s390x-linux64
# Record which registers should be sent to GDB by default after stop.
arm-expedite = r11,sp,pc
@@ -43,6 +44,9 @@ mips64-expedite = r29,pc
powerpc-expedite = r1,pc
rs6000/powerpc-cell32l-expedite = r1,pc,r0,orig_r3,r4
rs6000/powerpc-cell64l-expedite = r1,pc,r0,orig_r3,r4
+s390-linux32-expedite = r14,r15,pswa
+s390-linux64-expedite = r14l,r15l,pswa
+s390x-linux64-expedite = r14,r15,pswa
XSLTPROC = xsltproc
diff --git a/gdb/features/s390-acr.xml b/gdb/features/s390-acr.xml
new file mode 100644
index 0000000..9bf3326
--- /dev/null
+++ b/gdb/features/s390-acr.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.s390.acr">
+ <reg name="acr0" bitsize="32" type="uint32" group="access"/>
+ <reg name="acr1" bitsize="32" type="uint32" group="access"/>
+ <reg name="acr2" bitsize="32" type="uint32" group="access"/>
+ <reg name="acr3" bitsize="32" type="uint32" group="access"/>
+ <reg name="acr4" bitsize="32" type="uint32" group="access"/>
+ <reg name="acr5" bitsize="32" type="uint32" group="access"/>
+ <reg name="acr6" bitsize="32" type="uint32" group="access"/>
+ <reg name="acr7" bitsize="32" type="uint32" group="access"/>
+ <reg name="acr8" bitsize="32" type="uint32" group="access"/>
+ <reg name="acr9" bitsize="32" type="uint32" group="access"/>
+ <reg name="acr10" bitsize="32" type="uint32" group="access"/>
+ <reg name="acr11" bitsize="32" type="uint32" group="access"/>
+ <reg name="acr12" bitsize="32" type="uint32" group="access"/>
+ <reg name="acr13" bitsize="32" type="uint32" group="access"/>
+ <reg name="acr14" bitsize="32" type="uint32" group="access"/>
+ <reg name="acr15" bitsize="32" type="uint32" group="access"/>
+</feature>
diff --git a/gdb/features/s390-core32.xml b/gdb/features/s390-core32.xml
new file mode 100644
index 0000000..5a752e8
--- /dev/null
+++ b/gdb/features/s390-core32.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.s390.core">
+ <reg name="pswm" bitsize="32" type="uint32" group="psw" save-restore="no"/>
+ <reg name="pswa" bitsize="32" type="uint32" group="psw" save-restore="no"/>
+ <reg name="r0" bitsize="32" type="uint32" group="general"/>
+ <reg name="r1" bitsize="32" type="uint32" group="general"/>
+ <reg name="r2" bitsize="32" type="uint32" group="general"/>
+ <reg name="r3" bitsize="32" type="uint32" group="general"/>
+ <reg name="r4" bitsize="32" type="uint32" group="general"/>
+ <reg name="r5" bitsize="32" type="uint32" group="general"/>
+ <reg name="r6" bitsize="32" type="uint32" group="general"/>
+ <reg name="r7" bitsize="32" type="uint32" group="general"/>
+ <reg name="r8" bitsize="32" type="uint32" group="general"/>
+ <reg name="r9" bitsize="32" type="uint32" group="general"/>
+ <reg name="r10" bitsize="32" type="uint32" group="general"/>
+ <reg name="r11" bitsize="32" type="uint32" group="general"/>
+ <reg name="r12" bitsize="32" type="uint32" group="general"/>
+ <reg name="r13" bitsize="32" type="uint32" group="general"/>
+ <reg name="r14" bitsize="32" type="uint32" group="general"/>
+ <reg name="r15" bitsize="32" type="uint32" group="general"/>
+</feature>
diff --git a/gdb/features/s390-core64.xml b/gdb/features/s390-core64.xml
new file mode 100644
index 0000000..43bd9be
--- /dev/null
+++ b/gdb/features/s390-core64.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.s390.core">
+ <reg name="pswm" bitsize="32" type="uint32" group="psw" save-restore="no"/>
+ <reg name="pswa" bitsize="32" type="uint32" group="psw" save-restore="no"/>
+ <reg name="r0h" bitsize="32" type="uint32" group="upper"/>
+ <reg name="r0l" bitsize="32" type="uint32" group="lower"/>
+ <reg name="r1h" bitsize="32" type="uint32" group="upper"/>
+ <reg name="r1l" bitsize="32" type="uint32" group="lower"/>
+ <reg name="r2h" bitsize="32" type="uint32" group="upper"/>
+ <reg name="r2l" bitsize="32" type="uint32" group="lower"/>
+ <reg name="r3h" bitsize="32" type="uint32" group="upper"/>
+ <reg name="r3l" bitsize="32" type="uint32" group="lower"/>
+ <reg name="r4h" bitsize="32" type="uint32" group="upper"/>
+ <reg name="r4l" bitsize="32" type="uint32" group="lower"/>
+ <reg name="r5h" bitsize="32" type="uint32" group="upper"/>
+ <reg name="r5l" bitsize="32" type="uint32" group="lower"/>
+ <reg name="r6h" bitsize="32" type="uint32" group="upper"/>
+ <reg name="r6l" bitsize="32" type="uint32" group="lower"/>
+ <reg name="r7h" bitsize="32" type="uint32" group="upper"/>
+ <reg name="r7l" bitsize="32" type="uint32" group="lower"/>
+ <reg name="r8h" bitsize="32" type="uint32" group="upper"/>
+ <reg name="r8l" bitsize="32" type="uint32" group="lower"/>
+ <reg name="r9h" bitsize="32" type="uint32" group="upper"/>
+ <reg name="r9l" bitsize="32" type="uint32" group="lower"/>
+ <reg name="r10h" bitsize="32" type="uint32" group="upper"/>
+ <reg name="r10l" bitsize="32" type="uint32" group="lower"/>
+ <reg name="r11h" bitsize="32" type="uint32" group="upper"/>
+ <reg name="r11l" bitsize="32" type="uint32" group="lower"/>
+ <reg name="r12h" bitsize="32" type="uint32" group="upper"/>
+ <reg name="r12l" bitsize="32" type="uint32" group="lower"/>
+ <reg name="r13h" bitsize="32" type="uint32" group="upper"/>
+ <reg name="r13l" bitsize="32" type="uint32" group="lower"/>
+ <reg name="r14h" bitsize="32" type="uint32" group="upper"/>
+ <reg name="r14l" bitsize="32" type="uint32" group="lower"/>
+ <reg name="r15h" bitsize="32" type="uint32" group="upper"/>
+ <reg name="r15l" bitsize="32" type="uint32" group="lower"/>
+</feature>
+
diff --git a/gdb/features/s390-fpr.xml b/gdb/features/s390-fpr.xml
new file mode 100644
index 0000000..8a9599a
--- /dev/null
+++ b/gdb/features/s390-fpr.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.s390.fpr">
+ <reg name="fpc" bitsize="32" type="uint32" group="float"/>
+ <reg name="f0" bitsize="64" type="ieee_double" group="float"/>
+ <reg name="f1" bitsize="64" type="ieee_double" group="float"/>
+ <reg name="f2" bitsize="64" type="ieee_double" group="float"/>
+ <reg name="f3" bitsize="64" type="ieee_double" group="float"/>
+ <reg name="f4" bitsize="64" type="ieee_double" group="float"/>
+ <reg name="f5" bitsize="64" type="ieee_double" group="float"/>
+ <reg name="f6" bitsize="64" type="ieee_double" group="float"/>
+ <reg name="f7" bitsize="64" type="ieee_double" group="float"/>
+ <reg name="f8" bitsize="64" type="ieee_double" group="float"/>
+ <reg name="f9" bitsize="64" type="ieee_double" group="float"/>
+ <reg name="f10" bitsize="64" type="ieee_double" group="float"/>
+ <reg name="f11" bitsize="64" type="ieee_double" group="float"/>
+ <reg name="f12" bitsize="64" type="ieee_double" group="float"/>
+ <reg name="f13" bitsize="64" type="ieee_double" group="float"/>
+ <reg name="f14" bitsize="64" type="ieee_double" group="float"/>
+ <reg name="f15" bitsize="64" type="ieee_double" group="float"/>
+</feature>
diff --git a/gdb/features/s390-linux32.c b/gdb/features/s390-linux32.c
new file mode 100644
index 0000000..0ff3868
--- /dev/null
+++ b/gdb/features/s390-linux32.c
@@ -0,0 +1,74 @@
+/* THIS FILE IS GENERATED. Original: s390-linux32.xml */
+
+#include "defs.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_s390_linux32;
+static void
+initialize_tdesc_s390_linux32 (void)
+{
+ struct target_desc *result = allocate_target_description ();
+ struct tdesc_feature *feature;
+ struct tdesc_type *field_type, *type;
+
+ set_tdesc_architecture (result, bfd_scan_arch ("s390:31-bit"));
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ tdesc_create_reg (feature, "pswm", 0, 0, "psw", 32, "uint32");
+ tdesc_create_reg (feature, "pswa", 1, 0, "psw", 32, "uint32");
+ tdesc_create_reg (feature, "r0", 2, 1, "general", 32, "uint32");
+ tdesc_create_reg (feature, "r1", 3, 1, "general", 32, "uint32");
+ tdesc_create_reg (feature, "r2", 4, 1, "general", 32, "uint32");
+ tdesc_create_reg (feature, "r3", 5, 1, "general", 32, "uint32");
+ tdesc_create_reg (feature, "r4", 6, 1, "general", 32, "uint32");
+ tdesc_create_reg (feature, "r5", 7, 1, "general", 32, "uint32");
+ tdesc_create_reg (feature, "r6", 8, 1, "general", 32, "uint32");
+ tdesc_create_reg (feature, "r7", 9, 1, "general", 32, "uint32");
+ tdesc_create_reg (feature, "r8", 10, 1, "general", 32, "uint32");
+ tdesc_create_reg (feature, "r9", 11, 1, "general", 32, "uint32");
+ tdesc_create_reg (feature, "r10", 12, 1, "general", 32, "uint32");
+ tdesc_create_reg (feature, "r11", 13, 1, "general", 32, "uint32");
+ tdesc_create_reg (feature, "r12", 14, 1, "general", 32, "uint32");
+ tdesc_create_reg (feature, "r13", 15, 1, "general", 32, "uint32");
+ tdesc_create_reg (feature, "r14", 16, 1, "general", 32, "uint32");
+ tdesc_create_reg (feature, "r15", 17, 1, "general", 32, "uint32");
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ tdesc_create_reg (feature, "acr0", 18, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr1", 19, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr2", 20, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr3", 21, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr4", 22, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr5", 23, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr6", 24, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr7", 25, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr8", 26, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr9", 27, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr10", 28, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr11", 29, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr12", 30, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr13", 31, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr14", 32, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr15", 33, 1, "access", 32, "uint32");
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ tdesc_create_reg (feature, "fpc", 34, 1, "float", 32, "uint32");
+ tdesc_create_reg (feature, "f0", 35, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f1", 36, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f2", 37, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f3", 38, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f4", 39, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f5", 40, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f6", 41, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f7", 42, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f8", 43, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f9", 44, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f10", 45, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f11", 46, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f12", 47, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f13", 48, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f14", 49, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f15", 50, 1, "float", 64, "ieee_double");
+
+ tdesc_s390_linux32 = result;
+}
diff --git a/gdb/features/s390-linux32.xml b/gdb/features/s390-linux32.xml
new file mode 100644
index 0000000..45153fd
--- /dev/null
+++ b/gdb/features/s390-linux32.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!-- S/390 31-bit user-level code on a machine operating
+ in ESA/390 architecture mode. -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+ <architecture>s390:31-bit</architecture>
+ <xi:include href="s390-core32.xml"/>
+ <xi:include href="s390-acr.xml"/>
+ <xi:include href="s390-fpr.xml"/>
+</target>
diff --git a/gdb/features/s390-linux64.c b/gdb/features/s390-linux64.c
new file mode 100644
index 0000000..1e39fc3
--- /dev/null
+++ b/gdb/features/s390-linux64.c
@@ -0,0 +1,90 @@
+/* THIS FILE IS GENERATED. Original: s390-linux64.xml */
+
+#include "defs.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_s390_linux64;
+static void
+initialize_tdesc_s390_linux64 (void)
+{
+ struct target_desc *result = allocate_target_description ();
+ struct tdesc_feature *feature;
+ struct tdesc_type *field_type, *type;
+
+ set_tdesc_architecture (result, bfd_scan_arch ("s390:31-bit"));
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ tdesc_create_reg (feature, "pswm", 0, 0, "psw", 32, "uint32");
+ tdesc_create_reg (feature, "pswa", 1, 0, "psw", 32, "uint32");
+ tdesc_create_reg (feature, "r0h", 2, 1, "upper", 32, "uint32");
+ tdesc_create_reg (feature, "r0l", 3, 1, "lower", 32, "uint32");
+ tdesc_create_reg (feature, "r1h", 4, 1, "upper", 32, "uint32");
+ tdesc_create_reg (feature, "r1l", 5, 1, "lower", 32, "uint32");
+ tdesc_create_reg (feature, "r2h", 6, 1, "upper", 32, "uint32");
+ tdesc_create_reg (feature, "r2l", 7, 1, "lower", 32, "uint32");
+ tdesc_create_reg (feature, "r3h", 8, 1, "upper", 32, "uint32");
+ tdesc_create_reg (feature, "r3l", 9, 1, "lower", 32, "uint32");
+ tdesc_create_reg (feature, "r4h", 10, 1, "upper", 32, "uint32");
+ tdesc_create_reg (feature, "r4l", 11, 1, "lower", 32, "uint32");
+ tdesc_create_reg (feature, "r5h", 12, 1, "upper", 32, "uint32");
+ tdesc_create_reg (feature, "r5l", 13, 1, "lower", 32, "uint32");
+ tdesc_create_reg (feature, "r6h", 14, 1, "upper", 32, "uint32");
+ tdesc_create_reg (feature, "r6l", 15, 1, "lower", 32, "uint32");
+ tdesc_create_reg (feature, "r7h", 16, 1, "upper", 32, "uint32");
+ tdesc_create_reg (feature, "r7l", 17, 1, "lower", 32, "uint32");
+ tdesc_create_reg (feature, "r8h", 18, 1, "upper", 32, "uint32");
+ tdesc_create_reg (feature, "r8l", 19, 1, "lower", 32, "uint32");
+ tdesc_create_reg (feature, "r9h", 20, 1, "upper", 32, "uint32");
+ tdesc_create_reg (feature, "r9l", 21, 1, "lower", 32, "uint32");
+ tdesc_create_reg (feature, "r10h", 22, 1, "upper", 32, "uint32");
+ tdesc_create_reg (feature, "r10l", 23, 1, "lower", 32, "uint32");
+ tdesc_create_reg (feature, "r11h", 24, 1, "upper", 32, "uint32");
+ tdesc_create_reg (feature, "r11l", 25, 1, "lower", 32, "uint32");
+ tdesc_create_reg (feature, "r12h", 26, 1, "upper", 32, "uint32");
+ tdesc_create_reg (feature, "r12l", 27, 1, "lower", 32, "uint32");
+ tdesc_create_reg (feature, "r13h", 28, 1, "upper", 32, "uint32");
+ tdesc_create_reg (feature, "r13l", 29, 1, "lower", 32, "uint32");
+ tdesc_create_reg (feature, "r14h", 30, 1, "upper", 32, "uint32");
+ tdesc_create_reg (feature, "r14l", 31, 1, "lower", 32, "uint32");
+ tdesc_create_reg (feature, "r15h", 32, 1, "upper", 32, "uint32");
+ tdesc_create_reg (feature, "r15l", 33, 1, "lower", 32, "uint32");
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ tdesc_create_reg (feature, "acr0", 34, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr1", 35, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr2", 36, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr3", 37, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr4", 38, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr5", 39, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr6", 40, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr7", 41, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr8", 42, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr9", 43, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr10", 44, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr11", 45, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr12", 46, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr13", 47, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr14", 48, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr15", 49, 1, "access", 32, "uint32");
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ tdesc_create_reg (feature, "fpc", 50, 1, "float", 32, "uint32");
+ tdesc_create_reg (feature, "f0", 51, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f1", 52, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f2", 53, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f3", 54, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f4", 55, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f5", 56, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f6", 57, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f7", 58, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f8", 59, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f9", 60, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f10", 61, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f11", 62, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f12", 63, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f13", 64, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f14", 65, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f15", 66, 1, "float", 64, "ieee_double");
+
+ tdesc_s390_linux64 = result;
+}
diff --git a/gdb/features/s390-linux64.xml b/gdb/features/s390-linux64.xml
new file mode 100644
index 0000000..10bb036
--- /dev/null
+++ b/gdb/features/s390-linux64.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!-- S/390 31-bit user-level code on a machine operating
+ in z/Architecture mode. -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+ <architecture>s390:31-bit</architecture>
+ <xi:include href="s390-core64.xml"/>
+ <xi:include href="s390-acr.xml"/>
+ <xi:include href="s390-fpr.xml"/>
+</target>
diff --git a/gdb/features/s390x-core64.xml b/gdb/features/s390x-core64.xml
new file mode 100644
index 0000000..34659c9
--- /dev/null
+++ b/gdb/features/s390x-core64.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.s390.core">
+ <reg name="pswm" bitsize="64" type="uint64" group="psw" save-restore="no"/>
+ <reg name="pswa" bitsize="64" type="uint64" group="psw" save-restore="no"/>
+ <reg name="r0" bitsize="64" type="uint64" group="general"/>
+ <reg name="r1" bitsize="64" type="uint64" group="general"/>
+ <reg name="r2" bitsize="64" type="uint64" group="general"/>
+ <reg name="r3" bitsize="64" type="uint64" group="general"/>
+ <reg name="r4" bitsize="64" type="uint64" group="general"/>
+ <reg name="r5" bitsize="64" type="uint64" group="general"/>
+ <reg name="r6" bitsize="64" type="uint64" group="general"/>
+ <reg name="r7" bitsize="64" type="uint64" group="general"/>
+ <reg name="r8" bitsize="64" type="uint64" group="general"/>
+ <reg name="r9" bitsize="64" type="uint64" group="general"/>
+ <reg name="r10" bitsize="64" type="uint64" group="general"/>
+ <reg name="r11" bitsize="64" type="uint64" group="general"/>
+ <reg name="r12" bitsize="64" type="uint64" group="general"/>
+ <reg name="r13" bitsize="64" type="uint64" group="general"/>
+ <reg name="r14" bitsize="64" type="uint64" group="general"/>
+ <reg name="r15" bitsize="64" type="uint64" group="general"/>
+</feature>
diff --git a/gdb/features/s390x-linux64.c b/gdb/features/s390x-linux64.c
new file mode 100644
index 0000000..91d2da9
--- /dev/null
+++ b/gdb/features/s390x-linux64.c
@@ -0,0 +1,74 @@
+/* THIS FILE IS GENERATED. Original: s390x-linux64.xml */
+
+#include "defs.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_s390x_linux64;
+static void
+initialize_tdesc_s390x_linux64 (void)
+{
+ struct target_desc *result = allocate_target_description ();
+ struct tdesc_feature *feature;
+ struct tdesc_type *field_type, *type;
+
+ set_tdesc_architecture (result, bfd_scan_arch ("s390:64-bit"));
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.s390.core");
+ tdesc_create_reg (feature, "pswm", 0, 0, "psw", 64, "uint64");
+ tdesc_create_reg (feature, "pswa", 1, 0, "psw", 64, "uint64");
+ tdesc_create_reg (feature, "r0", 2, 1, "general", 64, "uint64");
+ tdesc_create_reg (feature, "r1", 3, 1, "general", 64, "uint64");
+ tdesc_create_reg (feature, "r2", 4, 1, "general", 64, "uint64");
+ tdesc_create_reg (feature, "r3", 5, 1, "general", 64, "uint64");
+ tdesc_create_reg (feature, "r4", 6, 1, "general", 64, "uint64");
+ tdesc_create_reg (feature, "r5", 7, 1, "general", 64, "uint64");
+ tdesc_create_reg (feature, "r6", 8, 1, "general", 64, "uint64");
+ tdesc_create_reg (feature, "r7", 9, 1, "general", 64, "uint64");
+ tdesc_create_reg (feature, "r8", 10, 1, "general", 64, "uint64");
+ tdesc_create_reg (feature, "r9", 11, 1, "general", 64, "uint64");
+ tdesc_create_reg (feature, "r10", 12, 1, "general", 64, "uint64");
+ tdesc_create_reg (feature, "r11", 13, 1, "general", 64, "uint64");
+ tdesc_create_reg (feature, "r12", 14, 1, "general", 64, "uint64");
+ tdesc_create_reg (feature, "r13", 15, 1, "general", 64, "uint64");
+ tdesc_create_reg (feature, "r14", 16, 1, "general", 64, "uint64");
+ tdesc_create_reg (feature, "r15", 17, 1, "general", 64, "uint64");
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.s390.acr");
+ tdesc_create_reg (feature, "acr0", 18, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr1", 19, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr2", 20, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr3", 21, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr4", 22, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr5", 23, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr6", 24, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr7", 25, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr8", 26, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr9", 27, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr10", 28, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr11", 29, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr12", 30, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr13", 31, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr14", 32, 1, "access", 32, "uint32");
+ tdesc_create_reg (feature, "acr15", 33, 1, "access", 32, "uint32");
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.s390.fpr");
+ tdesc_create_reg (feature, "fpc", 34, 1, "float", 32, "uint32");
+ tdesc_create_reg (feature, "f0", 35, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f1", 36, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f2", 37, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f3", 38, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f4", 39, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f5", 40, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f6", 41, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f7", 42, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f8", 43, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f9", 44, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f10", 45, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f11", 46, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f12", 47, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f13", 48, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f14", 49, 1, "float", 64, "ieee_double");
+ tdesc_create_reg (feature, "f15", 50, 1, "float", 64, "ieee_double");
+
+ tdesc_s390x_linux64 = result;
+}
diff --git a/gdb/features/s390x-linux64.xml b/gdb/features/s390x-linux64.xml
new file mode 100644
index 0000000..f3700a4
--- /dev/null
+++ b/gdb/features/s390x-linux64.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!-- S/390 64-bit user-level code. -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+ <architecture>s390:64-bit</architecture>
+ <xi:include href="s390x-core64.xml"/>
+ <xi:include href="s390-acr.xml"/>
+ <xi:include href="s390-fpr.xml"/>
+</target>