mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-01-18 15:02:42 +00:00
* 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.
This commit is contained in:
parent
1b1818e443
commit
7803799a0f
@ -1,3 +1,88 @@
|
||||
2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* regset.h (struct core_regset_section): Add HUMAN_NAME.
|
||||
|
@ -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
|
||||
|
26
gdb/features/s390-acr.xml
Normal file
26
gdb/features/s390-acr.xml
Normal file
@ -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>
|
28
gdb/features/s390-core32.xml
Normal file
28
gdb/features/s390-core32.xml
Normal file
@ -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>
|
45
gdb/features/s390-core64.xml
Normal file
45
gdb/features/s390-core64.xml
Normal file
@ -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>
|
||||
|
27
gdb/features/s390-fpr.xml
Normal file
27
gdb/features/s390-fpr.xml
Normal file
@ -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>
|
74
gdb/features/s390-linux32.c
Normal file
74
gdb/features/s390-linux32.c
Normal file
@ -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;
|
||||
}
|
17
gdb/features/s390-linux32.xml
Normal file
17
gdb/features/s390-linux32.xml
Normal file
@ -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>
|
90
gdb/features/s390-linux64.c
Normal file
90
gdb/features/s390-linux64.c
Normal file
@ -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;
|
||||
}
|
17
gdb/features/s390-linux64.xml
Normal file
17
gdb/features/s390-linux64.xml
Normal file
@ -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>
|
28
gdb/features/s390x-core64.xml
Normal file
28
gdb/features/s390x-core64.xml
Normal file
@ -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>
|
74
gdb/features/s390x-linux64.c
Normal file
74
gdb/features/s390x-linux64.c
Normal file
@ -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;
|
||||
}
|
16
gdb/features/s390x-linux64.xml
Normal file
16
gdb/features/s390x-linux64.xml
Normal file
@ -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>
|
@ -1,3 +1,30 @@
|
||||
2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2010-01-01 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* server.c (gdbserver_version): Update copyright year to 2010.
|
||||
|
@ -215,6 +215,7 @@ clean:
|
||||
rm -f powerpc-isa205-32l.c powerpc-isa205-64l.c
|
||||
rm -f powerpc-isa205-altivec32l.c powerpc-isa205-vsx32l.c powerpc-isa205-altivec64l.c
|
||||
rm -f powerpc-isa205-vsx64l.c
|
||||
rm -f s390-linux32.c s390-linux64.c s390x-linux64.c
|
||||
rm -f xml-builtin.c stamp-xml
|
||||
|
||||
maintainer-clean realclean distclean: clean
|
||||
@ -413,12 +414,15 @@ powerpc-isa205-altivec64l.c : $(srcdir)/../regformats/rs6000/powerpc-isa205-alti
|
||||
powerpc-isa205-vsx64l.o : powerpc-isa205-vsx64l.c $(regdef_h)
|
||||
powerpc-isa205-vsx64l.c : $(srcdir)/../regformats/rs6000/powerpc-isa205-vsx64l.dat $(regdat_sh)
|
||||
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/rs6000/powerpc-isa205-vsx64l.dat powerpc-isa205-vsx64l.c
|
||||
reg-s390.o : reg-s390.c $(regdef_h)
|
||||
reg-s390.c : $(srcdir)/../regformats/reg-s390.dat $(regdat_sh)
|
||||
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-s390.dat reg-s390.c
|
||||
reg-s390x.o : reg-s390x.c $(regdef_h)
|
||||
reg-s390x.c : $(srcdir)/../regformats/reg-s390x.dat $(regdat_sh)
|
||||
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-s390x.dat reg-s390x.c
|
||||
s390-linux32.o : s390-linux32.c $(regdef_h)
|
||||
s390-linux32.c : $(srcdir)/../regformats/s390-linux32.dat $(regdat_sh)
|
||||
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/s390-linux32.dat s390-linux32.c
|
||||
s390-linux64.o : s390-linux64.c $(regdef_h)
|
||||
s390-linux64.c : $(srcdir)/../regformats/s390-linux64.dat $(regdat_sh)
|
||||
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/s390-linux64.dat s390-linux64.c
|
||||
s390x-linux64.o : s390x-linux64.c $(regdef_h)
|
||||
s390x-linux64.c : $(srcdir)/../regformats/s390x-linux64.dat $(regdat_sh)
|
||||
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/s390x-linux64.dat s390x-linux64.c
|
||||
reg-sh.o : reg-sh.c $(regdef_h)
|
||||
reg-sh.c : $(srcdir)/../regformats/reg-sh.dat $(regdat_sh)
|
||||
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-sh.dat reg-sh.c
|
||||
|
@ -176,8 +176,18 @@ case "${target}" in
|
||||
srv_linux_regsets=yes
|
||||
srv_linux_thread_db=yes
|
||||
;;
|
||||
s390*-*-linux*) srv_regobj="reg-s390.o reg-s390x.o"
|
||||
s390*-*-linux*) srv_regobj="s390-linux32.o"
|
||||
srv_regobj="${srv_regobj} s390-linux64.o"
|
||||
srv_regobj="${srv_regobj} s390x-linux64.o"
|
||||
srv_tgtobj="linux-low.o linux-s390-low.o"
|
||||
srv_xmlfiles="s390-linux32.xml"
|
||||
srv_xmlfiles="${srv_xmlfiles} s390-linux64.xml"
|
||||
srv_xmlfiles="${srv_xmlfiles} s390x-linux64.xml"
|
||||
srv_xmlfiles="${srv_xmlfiles} s390-core32.xml"
|
||||
srv_xmlfiles="${srv_xmlfiles} s390-core64.xml"
|
||||
srv_xmlfiles="${srv_xmlfiles} s390x-core64.xml"
|
||||
srv_xmlfiles="${srv_xmlfiles} s390-acr.xml"
|
||||
srv_xmlfiles="${srv_xmlfiles} s390-fpr.xml"
|
||||
srv_linux_usrregs=yes
|
||||
srv_linux_regsets=yes
|
||||
srv_linux_thread_db=yes
|
||||
|
@ -24,12 +24,18 @@
|
||||
#include "linux-low.h"
|
||||
|
||||
#include <asm/ptrace.h>
|
||||
#include <elf.h>
|
||||
|
||||
/* Defined in auto-generated file reg-s390.c. */
|
||||
void init_registers_s390 (void);
|
||||
/* Defined in auto-generated file reg-s390x.c. */
|
||||
void init_registers_s390x (void);
|
||||
#ifndef HWCAP_S390_HIGH_GPRS
|
||||
#define HWCAP_S390_HIGH_GPRS 512
|
||||
#endif
|
||||
|
||||
/* Defined in auto-generated file s390-linux32.c. */
|
||||
void init_registers_s390_linux32 (void);
|
||||
/* Defined in auto-generated file s390-linux64.c. */
|
||||
void init_registers_s390_linux64 (void);
|
||||
/* Defined in auto-generated file s390x-linux64.c. */
|
||||
void init_registers_s390x_linux64 (void);
|
||||
|
||||
#define s390_num_regs 51
|
||||
|
||||
@ -61,21 +67,41 @@ static int s390_regmap[] = {
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef __s390x__
|
||||
#define s390_num_regs_3264 67
|
||||
|
||||
static int s390_regmap_3264[] = {
|
||||
PT_PSWMASK, PT_PSWADDR,
|
||||
|
||||
PT_GPR0, PT_GPR0, PT_GPR1, PT_GPR1, PT_GPR2, PT_GPR2, PT_GPR3, PT_GPR3,
|
||||
PT_GPR4, PT_GPR4, PT_GPR5, PT_GPR5, PT_GPR6, PT_GPR6, PT_GPR7, PT_GPR7,
|
||||
PT_GPR8, PT_GPR8, PT_GPR9, PT_GPR9, PT_GPR10, PT_GPR10, PT_GPR11, PT_GPR11,
|
||||
PT_GPR12, PT_GPR12, PT_GPR13, PT_GPR13, PT_GPR14, PT_GPR14, PT_GPR15, PT_GPR15,
|
||||
|
||||
PT_ACR0, PT_ACR1, PT_ACR2, PT_ACR3,
|
||||
PT_ACR4, PT_ACR5, PT_ACR6, PT_ACR7,
|
||||
PT_ACR8, PT_ACR9, PT_ACR10, PT_ACR11,
|
||||
PT_ACR12, PT_ACR13, PT_ACR14, PT_ACR15,
|
||||
|
||||
PT_FPC,
|
||||
|
||||
PT_FPR0, PT_FPR1, PT_FPR2, PT_FPR3,
|
||||
PT_FPR4, PT_FPR5, PT_FPR6, PT_FPR7,
|
||||
PT_FPR8, PT_FPR9, PT_FPR10, PT_FPR11,
|
||||
PT_FPR12, PT_FPR13, PT_FPR14, PT_FPR15,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
static int
|
||||
s390_cannot_fetch_register (int regno)
|
||||
{
|
||||
if (s390_regmap[regno] == -1)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
s390_cannot_store_register (int regno)
|
||||
{
|
||||
if (s390_regmap[regno] == -1)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -85,17 +111,25 @@ s390_collect_ptrace_register (int regno, char *buf)
|
||||
int size = register_size (regno);
|
||||
if (size < sizeof (long))
|
||||
{
|
||||
int regaddr = the_low_target.regmap[regno];
|
||||
|
||||
memset (buf, 0, sizeof (long));
|
||||
|
||||
if (regno == find_regno ("pswa")
|
||||
|| (regno >= find_regno ("r0") && regno <= find_regno ("r15")))
|
||||
if ((regno ^ 1) < the_low_target.num_regs
|
||||
&& the_low_target.regmap[regno ^ 1] == regaddr)
|
||||
{
|
||||
collect_register (regno & ~1, buf);
|
||||
collect_register ((regno & ~1) + 1, buf + sizeof (long) - size);
|
||||
}
|
||||
else if (regaddr == PT_PSWADDR
|
||||
|| (regaddr >= PT_GPR0 && regaddr <= PT_GPR15))
|
||||
collect_register (regno, buf + sizeof (long) - size);
|
||||
else
|
||||
collect_register (regno, buf);
|
||||
|
||||
/* When debugging a 32-bit inferior on a 64-bit host, make sure
|
||||
the 31-bit addressing mode bit is set in the PSW mask. */
|
||||
if (regno == find_regno ("pswm"))
|
||||
if (regaddr == PT_PSWMASK)
|
||||
buf[size] |= 0x80;
|
||||
}
|
||||
else
|
||||
@ -108,8 +142,16 @@ s390_supply_ptrace_register (int regno, const char *buf)
|
||||
int size = register_size (regno);
|
||||
if (size < sizeof (long))
|
||||
{
|
||||
if (regno == find_regno ("pswa")
|
||||
|| (regno >= find_regno ("r0") && regno <= find_regno ("r15")))
|
||||
int regaddr = the_low_target.regmap[regno];
|
||||
|
||||
if ((regno ^ 1) < the_low_target.num_regs
|
||||
&& the_low_target.regmap[regno ^ 1] == regaddr)
|
||||
{
|
||||
supply_register (regno & ~1, buf);
|
||||
supply_register ((regno & ~1) + 1, buf + sizeof (long) - size);
|
||||
}
|
||||
else if (regaddr == PT_PSWADDR
|
||||
|| (regaddr >= PT_GPR0 && regaddr <= PT_GPR15))
|
||||
supply_register (regno, buf + sizeof (long) - size);
|
||||
else
|
||||
supply_register (regno, buf);
|
||||
@ -125,8 +167,15 @@ static void s390_fill_gregset (void *buf)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 34; i++)
|
||||
s390_collect_ptrace_register (i, (char *) buf + s390_regmap[i]);
|
||||
for (i = 0; i < the_low_target.num_regs; i++)
|
||||
{
|
||||
if (the_low_target.regmap[i] < PT_PSWMASK
|
||||
|| the_low_target.regmap[i] > PT_ACR15)
|
||||
continue;
|
||||
|
||||
s390_collect_ptrace_register (i, (char *) buf
|
||||
+ the_low_target.regmap[i]);
|
||||
}
|
||||
}
|
||||
|
||||
struct regset_info target_regsets[] = {
|
||||
@ -176,12 +225,43 @@ s390_set_pc (CORE_ADDR newpc)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __s390x__
|
||||
static unsigned long
|
||||
s390_get_hwcap (void)
|
||||
{
|
||||
int wordsize = register_size (0);
|
||||
unsigned char *data = alloca (2 * wordsize);
|
||||
int offset = 0;
|
||||
|
||||
while ((*the_target->read_auxv) (offset, data, 2 * wordsize) == 2 * wordsize)
|
||||
{
|
||||
if (wordsize == 4)
|
||||
{
|
||||
unsigned int *data_p = (unsigned int *)data;
|
||||
if (data_p[0] == AT_HWCAP)
|
||||
return data_p[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned long *data_p = (unsigned long *)data;
|
||||
if (data_p[0] == AT_HWCAP)
|
||||
return data_p[1];
|
||||
}
|
||||
|
||||
offset += 2 * wordsize;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
s390_arch_setup (void)
|
||||
{
|
||||
/* Assume 31-bit inferior process. */
|
||||
init_registers_s390 ();
|
||||
init_registers_s390_linux32 ();
|
||||
the_low_target.num_regs = s390_num_regs;
|
||||
the_low_target.regmap = s390_regmap;
|
||||
|
||||
/* On a 64-bit host, check the low bit of the (31-bit) PSWM
|
||||
-- if this is one, we actually have a 64-bit inferior. */
|
||||
@ -190,7 +270,16 @@ s390_arch_setup (void)
|
||||
unsigned int pswm;
|
||||
collect_register_by_name ("pswm", &pswm);
|
||||
if (pswm & 1)
|
||||
init_registers_s390x ();
|
||||
init_registers_s390x_linux64 ();
|
||||
|
||||
/* For a 31-bit inferior, check whether the kernel supports
|
||||
using the full 64-bit GPRs. */
|
||||
else if (s390_get_hwcap () & HWCAP_S390_HIGH_GPRS)
|
||||
{
|
||||
init_registers_s390_linux64 ();
|
||||
the_low_target.num_regs = s390_num_regs_3264;
|
||||
the_low_target.regmap = s390_regmap_3264;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
name:s390
|
||||
# DO NOT EDIT: generated from s390-linux32.xml
|
||||
name:s390_linux32
|
||||
xmltarget:s390-linux32.xml
|
||||
expedite:r14,r15,pswa
|
||||
32:pswm
|
||||
32:pswa
|
71
gdb/regformats/s390-linux64.dat
Normal file
71
gdb/regformats/s390-linux64.dat
Normal file
@ -0,0 +1,71 @@
|
||||
# DO NOT EDIT: generated from s390-linux64.xml
|
||||
name:s390_linux64
|
||||
xmltarget:s390-linux64.xml
|
||||
expedite:r14l,r15l,pswa
|
||||
32:pswm
|
||||
32:pswa
|
||||
32:r0h
|
||||
32:r0l
|
||||
32:r1h
|
||||
32:r1l
|
||||
32:r2h
|
||||
32:r2l
|
||||
32:r3h
|
||||
32:r3l
|
||||
32:r4h
|
||||
32:r4l
|
||||
32:r5h
|
||||
32:r5l
|
||||
32:r6h
|
||||
32:r6l
|
||||
32:r7h
|
||||
32:r7l
|
||||
32:r8h
|
||||
32:r8l
|
||||
32:r9h
|
||||
32:r9l
|
||||
32:r10h
|
||||
32:r10l
|
||||
32:r11h
|
||||
32:r11l
|
||||
32:r12h
|
||||
32:r12l
|
||||
32:r13h
|
||||
32:r13l
|
||||
32:r14h
|
||||
32:r14l
|
||||
32:r15h
|
||||
32:r15l
|
||||
32:acr0
|
||||
32:acr1
|
||||
32:acr2
|
||||
32:acr3
|
||||
32:acr4
|
||||
32:acr5
|
||||
32:acr6
|
||||
32:acr7
|
||||
32:acr8
|
||||
32:acr9
|
||||
32:acr10
|
||||
32:acr11
|
||||
32:acr12
|
||||
32:acr13
|
||||
32:acr14
|
||||
32:acr15
|
||||
32:fpc
|
||||
64:f0
|
||||
64:f1
|
||||
64:f2
|
||||
64:f3
|
||||
64:f4
|
||||
64:f5
|
||||
64:f6
|
||||
64:f7
|
||||
64:f8
|
||||
64:f9
|
||||
64:f10
|
||||
64:f11
|
||||
64:f12
|
||||
64:f13
|
||||
64:f14
|
||||
64:f15
|
@ -1,4 +1,6 @@
|
||||
name:s390x
|
||||
# DO NOT EDIT: generated from s390x-linux64.xml
|
||||
name:s390x_linux64
|
||||
xmltarget:s390x-linux64.xml
|
||||
expedite:r14,r15,pswa
|
||||
64:pswm
|
||||
64:pswa
|
@ -25,6 +25,7 @@
|
||||
#include "inferior.h"
|
||||
#include "target.h"
|
||||
#include "linux-nat.h"
|
||||
#include "auxv.h"
|
||||
|
||||
#include "s390-tdep.h"
|
||||
|
||||
@ -33,6 +34,11 @@
|
||||
#include <asm/types.h>
|
||||
#include <sys/procfs.h>
|
||||
#include <sys/ucontext.h>
|
||||
#include <elf.h>
|
||||
|
||||
#ifndef HWCAP_S390_HIGH_GPRS
|
||||
#define HWCAP_S390_HIGH_GPRS 512
|
||||
#endif
|
||||
|
||||
|
||||
/* Map registers to gregset/ptrace offsets.
|
||||
@ -389,6 +395,83 @@ s390_region_ok_for_hw_watchpoint (CORE_ADDR addr, int cnt)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
s390_target_wordsize (void)
|
||||
{
|
||||
int wordsize = 4;
|
||||
|
||||
/* Check for 64-bit inferior process. This is the case when the host is
|
||||
64-bit, and in addition bit 32 of the PSW mask is set. */
|
||||
#ifdef __s390x__
|
||||
long pswm;
|
||||
|
||||
errno = 0;
|
||||
pswm = (long) ptrace (PTRACE_PEEKUSER, s390_inferior_tid (), PT_PSWMASK, 0);
|
||||
if (errno == 0 && (pswm & 0x100000000ul) != 0)
|
||||
wordsize = 8;
|
||||
#endif
|
||||
|
||||
return wordsize;
|
||||
}
|
||||
|
||||
static int
|
||||
s390_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
|
||||
gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
|
||||
{
|
||||
int sizeof_auxv_field = s390_target_wordsize ();
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch);
|
||||
gdb_byte *ptr = *readptr;
|
||||
|
||||
if (endptr == ptr)
|
||||
return 0;
|
||||
|
||||
if (endptr - ptr < sizeof_auxv_field * 2)
|
||||
return -1;
|
||||
|
||||
*typep = extract_unsigned_integer (ptr, sizeof_auxv_field, byte_order);
|
||||
ptr += sizeof_auxv_field;
|
||||
*valp = extract_unsigned_integer (ptr, sizeof_auxv_field, byte_order);
|
||||
ptr += sizeof_auxv_field;
|
||||
|
||||
*readptr = ptr;
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef __s390x__
|
||||
static unsigned long
|
||||
s390_get_hwcap (void)
|
||||
{
|
||||
CORE_ADDR field;
|
||||
|
||||
if (target_auxv_search (¤t_target, AT_HWCAP, &field))
|
||||
return (unsigned long) field;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct target_desc *
|
||||
s390_read_description (struct target_ops *ops)
|
||||
{
|
||||
#ifdef __s390x__
|
||||
/* If GDB itself is compiled as 64-bit, we are running on a machine in
|
||||
z/Architecture mode. If the target is running in 64-bit addressing
|
||||
mode, report s390x architecture. If the target is running in 31-bit
|
||||
addressing mode, but the kernel supports using 64-bit registers in
|
||||
that mode, report s390 architecture with 64-bit GPRs. */
|
||||
|
||||
if (s390_target_wordsize () == 8)
|
||||
return tdesc_s390x_linux64;
|
||||
|
||||
if (s390_get_hwcap () & HWCAP_S390_HIGH_GPRS)
|
||||
return tdesc_s390_linux64;
|
||||
#endif
|
||||
|
||||
/* If GDB itself is compiled as 31-bit, or if we're running a 31-bit inferior
|
||||
on a 64-bit kernel that does not support using 64-bit registers in 31-bit
|
||||
mode, report s390 architecture with 32-bit GPRs. */
|
||||
return tdesc_s390_linux32;
|
||||
}
|
||||
|
||||
void _initialize_s390_nat (void);
|
||||
|
||||
@ -412,6 +495,10 @@ _initialize_s390_nat (void)
|
||||
t->to_insert_watchpoint = s390_insert_watchpoint;
|
||||
t->to_remove_watchpoint = s390_remove_watchpoint;
|
||||
|
||||
/* Detect target architecture. */
|
||||
t->to_read_description = s390_read_description;
|
||||
t->to_auxv_parse = s390_auxv_parse;
|
||||
|
||||
/* Register the target. */
|
||||
linux_nat_add_target (t);
|
||||
linux_nat_set_new_thread (t, s390_fix_watch_points);
|
||||
|
780
gdb/s390-tdep.c
780
gdb/s390-tdep.c
File diff suppressed because it is too large
Load Diff
@ -77,14 +77,25 @@
|
||||
#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
|
||||
/* 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)
|
||||
#define S390_NUM_REGS 67
|
||||
|
||||
/* Special register usage. */
|
||||
#define S390_SP_REGNUM S390_R15_REGNUM
|
||||
@ -99,5 +110,10 @@ extern int s390x_regmap_gregset[S390_NUM_REGS];
|
||||
#define s390_sizeof_fpregset 0x88
|
||||
extern int s390_regmap_fpregset[S390_NUM_REGS];
|
||||
|
||||
/* Linux target descriptions. */
|
||||
extern struct target_desc *tdesc_s390_linux32;
|
||||
extern struct target_desc *tdesc_s390_linux64;
|
||||
extern struct target_desc *tdesc_s390x_linux64;
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
2010-01-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
|
||||
|
||||
* gdb.xml/tdesc-regs.exp: Support s390*-*-* targets.
|
||||
|
||||
2010-01-03 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.mi/var-cmd.c (do_bitfield_tests): Change "V.sharable" type to
|
||||
|
@ -42,6 +42,9 @@ switch -glob -- [istarget] {
|
||||
set regdir "rs6000/"
|
||||
set core-regs {power-core.xml}
|
||||
}
|
||||
"s390*-*-*" {
|
||||
set core-regs {s390-core32.xml s390-acr.xml s390-fpr.xml}
|
||||
}
|
||||
"spu*-*-*" {
|
||||
# This may be either the spu-linux-nat target, or the Cell/B.E.
|
||||
# multi-architecture debugger in SPU standalone executable mode.
|
||||
|
Loading…
x
Reference in New Issue
Block a user