[PATCH 2/3] Add TDB regset

Andreas Arnez
2013-06-07T13:51:34Z

The z/Architecture transactional-execution facility includes support
for a "transaction diagnostic block" (TDB) that is written by the
hardware upon interrupted transactions. From a running inferior the
TDB can be retrieved via PTRACE_GETREGSET, but ENODATA is returned if
the inferior was interrupted outside transactions. Analogously, a
core file conditionally contains the TDB, depending on whether the
process died within a transaction or not. This patch represents the
TDB as a new regset in GDB.

gdb/ChangeLog:
2013-06-07 Andreas Arnez <arnez@linux.vnet.ibm.com>

* features/s390-tdb.xml: New file.

* features/s390x-linux64v2.xml: Include s390-tdb.xml.

* s390-tdep.h (S390_TDB_DWORD0_REGNUM): Define.
(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-tdep.c (s390_regmap_tdb): New regmap.
(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_gdbarch_init): Handle TDB regset.

* s390-nat.c (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.

* regformats/s390x-linux64v2.dat: Regenerate.

* features/s390x-linux64v2.c: Regenerate.

gdb/testsuite/ChangeLog:
2013-06-07 Andreas Arnez <arnez@linux.vnet.ibm.com>

* gdb.arch/s390-tdbregs.c: New file.

* gdb.arch/s390-tdbregs.exp: New file.

Index: gdb/gdb/features/s390-tdb.xml
===================================================================
--- /dev/null
+++ gdb/gdb/features/s390-tdb.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010-2013 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. -->
+
+
+<feature name="org.gnu.gdb.s390.tdb">
+ <reg name="tdb0" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tac" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tct" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="atia" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tr0" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tr1" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tr2" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tr3" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tr4" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tr5" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tr6" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tr7" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tr8" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tr9" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tr10" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tr11" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tr12" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tr13" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tr14" bitsize="64" type="uint64" group="tdb"/>
+ <reg name="tr15" bitsize="64" type="uint64" group="tdb"/>
+</feature>
Index: gdb/gdb/s390-tdep.c
===================================================================
--- gdb.orig/gdb/s390-tdep.c
+++ gdb/gdb/s390-tdep.c
@@ -568,6 +568,30 @@ const short s390_regmap_system_call[] =
-1, -1
};

+const short s390_regmap_tdb[] =
+ {
+ 0x00, S390_TDB_DWORD0_REGNUM,
+ 0x08, S390_TDB_ABORT_CODE_REGNUM,
+ 0x10, S390_TDB_CONFLICT_TOKEN_REGNUM,
+ 0x18, S390_TDB_ATIA_REGNUM,
+ 0x80, S390_TDB_R0_REGNUM,
+ 0x88, S390_TDB_R1_REGNUM,
+ 0x90, S390_TDB_R2_REGNUM,
+ 0x98, S390_TDB_R3_REGNUM,
+ 0xa0, S390_TDB_R4_REGNUM,
+ 0xa8, S390_TDB_R5_REGNUM,
+ 0xb0, S390_TDB_R6_REGNUM,
+ 0xb8, S390_TDB_R7_REGNUM,
+ 0xc0, S390_TDB_R8_REGNUM,
+ 0xc8, S390_TDB_R9_REGNUM,
+ 0xd0, S390_TDB_R10_REGNUM,
+ 0xd8, S390_TDB_R11_REGNUM,
+ 0xe0, S390_TDB_R12_REGNUM,
+ 0xe8, S390_TDB_R13_REGNUM,
+ 0xf0, S390_TDB_R14_REGNUM,
+ 0xf8, S390_TDB_R15_REGNUM,
+ -1, -1
+ };

/* Supply register REGNUM from the register set REGSET to register cache
@@ -639,6 +663,12 @@ static const struct regset s390_system_c
s390_collect_regset
};

+static const struct regset s390_tdb_regset = {
+ s390_regmap_tdb,
+ s390_supply_regset,
+ s390_collect_regset
+};
+
static struct core_regset_section s390_linux32_regset_sections[] =
{
{ ".reg", s390_sizeof_gregset, "general-purpose" },
@@ -687,6 +717,7 @@ static struct core_regset_section s390_l
{ ".reg-s390-high-gprs", 16*4, "s390 GPR upper halves" },
{ ".reg-s390-last-break", 8, "s930 last-break address" },
{ ".reg-s390-system-call", 4, "s390 system-call" },
+ { ".reg-s390-tdb", s390_sizeof_tdbregset, "s390 TDB" },
{ NULL, 0}
};

@@ -711,6 +742,7 @@ static struct core_regset_section s390x_
{ ".reg2", s390_sizeof_fpregset, "floating-point" },
{ ".reg-s390-last-break", 8, "s930 last-break address" },
{ ".reg-s390-system-call", 4, "s390 system-call" },
+ { ".reg-s390-tdb", s390_sizeof_tdbregset, "s390 TDB" },
{ NULL, 0}
};

@@ -739,6 +771,9 @@ s390_regset_from_core_section (struct gd
if (strcmp (sect_name, ".reg-s390-system-call") == 0 && sect_size >= 4)
return &s390_system_call_regset;

+ if (strcmp (sect_name, ".reg-s390-tdb") == 0 && sect_size >= 256)
+ return &s390_tdb_regset;
+
return NULL;
}

@@ -3011,6 +3046,11 @@ s390_gdbarch_init (struct gdbarch_info i
"r0h", "r1h", "r2h", "r3h", "r4h", "r5h", "r6h", "r7h",
"r8h", "r9h", "r10h", "r11h", "r12h", "r13h", "r14h", "r15h"
};
+ static const char *const tdb_regs[] = {
+ "tdb0", "tac", "tct", "atia",
+ "tr0", "tr1", "tr2", "tr3", "tr4", "tr5", "tr6", "tr7",
+ "tr8", "tr9", "tr10", "tr11", "tr12", "tr13", "tr14", "tr15"
+ };
const struct tdesc_feature *feature;
int i, valid_p = 1;

@@ -3088,6 +3128,16 @@ s390_gdbarch_init (struct gdbarch_info i
valid_p = 0;
}

+ /* Transaction diagnostic block. */
+ feature = tdesc_find_feature (tdesc, "org.gnu.gdb.s390.tdb");
+ if (feature)
+ {
+ for (i = 0; i < ARRAY_SIZE (tdb_regs); i++)
+ valid_p &= tdesc_numbered_register (feature, tdesc_data,
+ S390_TDB_DWORD0_REGNUM + i,
+ tdb_regs[i]);
+ }
+
if (!valid_p)
{
tdesc_data_cleanup (tdesc_data);
Index: gdb/gdb/features/s390x-linux64v2.xml
===================================================================
--- gdb.orig/gdb/features/s390x-linux64v2.xml
+++ gdb/gdb/features/s390x-linux64v2.xml
@@ -19,4 +19,6 @@
<reg name="last_break" bitsize="64" type="code_ptr" group="system" save-restore="no"/>
<reg name="system_call" bitsize="32" type="uint32" group="system"/>
</feature>
+
+ <xi:include href="s390-tdb.xml"/>
</target>
Index: gdb/gdb/s390-tdep.h
===================================================================
--- gdb.orig/gdb/s390-tdep.h
+++ gdb/gdb/s390-tdep.h
@@ -98,8 +98,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 +135,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 +148,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;
Index: gdb/gdb/s390-nat.c
===================================================================
--- gdb.orig/gdb/s390-nat.c
+++ gdb/gdb/s390-nat.c
@@ -51,6 +51,7 @@

static int have_regset_last_break = 0;
static int have_regset_system_call = 0;
+static int have_regset_tdb = 0;

/* Map registers to gregset/ptrace offsets.
These arrays are defined in s390-tdep.c. */
@@ -68,7 +69,7 @@ s390_native_supply (struct regcache *reg
const gdb_byte *regp)
{
for (; map[0] >= 0; map += 2)
- regcache_raw_supply (regcache, map[1], regp + map[0]);
+ regcache_raw_supply (regcache, map[1], regp ? regp + map[0] : NULL);
}

static void
@@ -305,9 +306,12 @@ fetch_regset (struct regcache *regcache,
iov.iov_len = regsize;

if (ptrace (PTRACE_GETREGSET, tid, (long) regset, (long) &iov) < 0)
- perror_with_name (_("Couldn't get register set"));
-
- s390_native_supply (regcache, regmap, buf);
+ if (errno == ENODATA)
+ s390_native_supply (regcache, regmap, NULL);
+ else
+ perror_with_name (_("Couldn't get register set"));
+ else
+ s390_native_supply (regcache, regmap, buf);
}

/* Store all registers in the kernel's register set whose number is REGSET,
@@ -343,10 +347,10 @@ check_regset (int tid, int regset, int r
iov.iov_base = buf;
iov.iov_len = regsize;

- if (ptrace (PTRACE_GETREGSET, tid, (long) regset, (long) &iov) < 0)
- return 0;
- else
+ if (ptrace (PTRACE_GETREGSET, tid, (long) regset, (long) &iov) >= 0
+ || errno == ENODATA)
return 1;
+ return 0;
}

/* Fetch register REGNUM from the child process. If REGNUM is -1, do
@@ -373,6 +377,11 @@ s390_linux_fetch_inferior_registers (str
if (regnum == -1 || regnum == S390_SYSTEM_CALL_REGNUM)
fetch_regset (regcache, tid, NT_S390_SYSTEM_CALL, 4,
s390_regmap_system_call);
+
+ if (have_regset_tdb)
+ if (regnum == -1 || S390_IS_TDBREGSET_REGNUM (regnum))
+ fetch_regset (regcache, tid, NT_S390_TDB, s390_sizeof_tdbregset,
+ s390_regmap_tdb);
}

/* Store register REGNUM back into the child process. If REGNUM is
@@ -615,6 +624,8 @@ s390_read_description (struct target_ops
= check_regset (tid, NT_S390_LAST_BREAK, 8);
have_regset_system_call
= check_regset (tid, NT_S390_SYSTEM_CALL, 4);
+ have_regset_tdb
+ = check_regset (tid, NT_S390_TDB, s390_sizeof_tdbregset);

#ifdef __s390x__
/* If GDB itself is compiled as 64-bit, we are running on a machine in
Index: gdb/gdb/features/s390x-linux64v2.c
===================================================================
--- gdb.orig/gdb/features/s390x-linux64v2.c
+++ gdb/gdb/features/s390x-linux64v2.c
@@ -76,5 +76,27 @@ initialize_tdesc_s390x_linux64v2 (void)
tdesc_create_reg (feature, "last_break", 52, 0, "system", 64, "code_ptr");
tdesc_create_reg (feature, "system_call", 53, 1, "system", 32, "uint32");

+ feature = tdesc_create_feature (result, "org.gnu.gdb.s390.tdb");
+ tdesc_create_reg (feature, "tdb0", 54, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tac", 55, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tct", 56, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "atia", 57, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr0", 58, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr1", 59, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr2", 60, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr3", 61, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr4", 62, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr5", 63, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr6", 64, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr7", 65, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr8", 66, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr9", 67, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr10", 68, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr11", 69, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr12", 70, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr13", 71, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr14", 72, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr15", 73, 1, "tdb", 64, "uint64");
+
tdesc_s390x_linux64v2 = result;
}
Index: gdb/gdb/regformats/s390x-linux64v2.dat
===================================================================
--- gdb.orig/gdb/regformats/s390x-linux64v2.dat
+++ gdb/gdb/regformats/s390x-linux64v2.dat
@@ -56,3 +56,23 @@ expedite:r14,r15,pswa
64:orig_r2
64:last_break
32:system_call
+64:tdb0
+64:tac
+64:tct
+64:atia
+64:tr0
+64:tr1
+64:tr2
+64:tr3
+64:tr4
+64:tr5
+64:tr6
+64:tr7
+64:tr8
+64:tr9
+64:tr10
+64:tr11
+64:tr12
+64:tr13
+64:tr14
+64:tr15
Index: gdb/gdb/testsuite/gdb.arch/s390-tdbregs.c
===================================================================
--- /dev/null
+++ gdb/gdb/testsuite/gdb.arch/s390-tdbregs.c
@@ -0,0 +1,62 @@
+/* Copyright 2008-2013 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <stdio.h>
+
+static void
+my_tbegin ()
+{
+ asm volatile ( "1: tbegin 0, 0xff00\n"
+ " jnz 1b"
+ : /* no return value */
+ : /* no inputs */
+ : "cc", "memory" );
+}
+
+static void
+my_tend ()
+{
+ asm volatile ( " tend"
+ : /* no return value */
+ : /* no inputs */
+ : "cc");
+}
+
+void
+try_transaction (void)
+{
+ my_tbegin ();
+ my_tend ();
+}
+
+void
+crash_in_transaction (void)
+{
+ volatile char *p = 0;
+
+ my_tbegin ();
+ *p = 5; /* FAULT */
+ my_tend ();
+}
+
+int
+main (int argc, char *argv[])
+{
+ try_transaction ();
+ crash_in_transaction ();
+ return 0;
+}
Index: gdb/gdb/testsuite/gdb.arch/s390-tdbregs.exp
===================================================================
--- /dev/null
+++ gdb/gdb/testsuite/gdb.arch/s390-tdbregs.exp
@@ -0,0 +1,75 @@
+# Copyright 2004-2013 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@gnu.org
+
+# This file is part of the gdb testsuite.
+
+
+if { ![istarget s390-*-*] && ![istarget s390x-*-* ] } {
+ verbose "Skipping s390 TDB register tests."
+ return
+}
+
+set testfile "s390-tdbregs"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [get_compiler_info] } {
+ return -1
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
+ executable [list debug additional_flags=-march=zEC12]] != "" } {
+ unsupported "No TE support (compile failed)."
+ return
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if { ![runto_main] } then {
+ gdb_suppress_tests
+}
+
+gdb_test_multiple "next" "check for TE support" {
+ -re "Program received signal SIGILL,.*\r\n$gdb_prompt $" {
+ unsupported "No TE support."
+ return
+ }
+ -re "\[0-9\]+.*\r\n$gdb_prompt $" {
+ pass "TE support available"
+ }
+ -re "$gdb_prompt $" {
+ unsupported "No TE support (unknown error)."
+ return
+ }
+}
+
+set crashline [gdb_get_line_number "FAULT"]
+
+gdb_test "print \$tdb0" "\\\$\[0-9\]+ = <unavailable>" "tdb0 unavailable"
+gdb_test "print \$tr0" "\\\$\[0-9\]+ = <unavailable>" "tr0 unavailable"
+gdb_test "next" \
+ "Program received signal SIGSEGV, .*" \
+ "crash in transaction"
+gdb_test "print/x \$tdb0" "\\\$\[0-9\]+ = 0x1.*" "tdb0 available"
+gdb_test "set print symbol-filename" "" "set print symbol-filename"
+gdb_test "print/a \$atia" \
+ "<crash_in_transaction.*:$crashline>" \
+ "ATIA points to crash"
Index: gdb/gdb/features/s390-linux64v2.xml
===================================================================
--- gdb.orig/gdb/features/s390-linux64v2.xml
+++ gdb/gdb/features/s390-linux64v2.xml
@@ -20,4 +20,6 @@
<reg name="last_break" bitsize="32" type="code_ptr" group="system" save-restore="no"/>
<reg name="system_call" bitsize="32" type="uint32" group="system"/>
</feature>
+
+ <xi:include href="s390-tdb.xml"/>
</target>
Index: gdb/gdb/features/s390-linux64v2.c
===================================================================
--- gdb.orig/gdb/features/s390-linux64v2.c
+++ gdb/gdb/features/s390-linux64v2.c
@@ -92,5 +92,27 @@ initialize_tdesc_s390_linux64v2 (void)
tdesc_create_reg (feature, "last_break", 68, 0, "system", 32, "code_ptr");
tdesc_create_reg (feature, "system_call", 69, 1, "system", 32, "uint32");

+ feature = tdesc_create_feature (result, "org.gnu.gdb.s390.tdb");
+ tdesc_create_reg (feature, "tdb0", 70, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tac", 71, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tct", 72, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "atia", 73, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr0", 74, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr1", 75, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr2", 76, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr3", 77, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr4", 78, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr5", 79, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr6", 80, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr7", 81, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr8", 82, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr9", 83, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr10", 84, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr11", 85, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr12", 86, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr13", 87, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr14", 88, 1, "tdb", 64, "uint64");
+ tdesc_create_reg (feature, "tr15", 89, 1, "tdb", 64, "uint64");
+
tdesc_s390_linux64v2 = result;
}
Index: gdb/gdb/regformats/s390-linux64v2.dat
===================================================================
--- gdb.orig/gdb/regformats/s390-linux64v2.dat
+++ gdb/gdb/regformats/s390-linux64v2.dat
@@ -72,3 +72,23 @@ expedite:r14l,r15l,pswa
32:orig_r2
32:last_break
32:system_call
+64:tdb0
+64:tac
+64:tct
+64:atia
+64:tr0
+64:tr1
+64:tr2
+64:tr3
+64:tr4
+64:tr5
+64:tr6
+64:tr7
+64:tr8
+64:tr9
+64:tr10
+64:tr11
+64:tr12
+64:tr13
+64:tr14
+64:tr15