+2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
+ * linux-low.c (regsets_fetch_inferior_registers): Suppress the
+ warning upon ENODATA from ptrace.
+ * linux-s390-low.c (s390_store_tdb): New.
+ (s390_regsets): Add regset for NT_S390_TDB.
+
2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
* linux-low.c (regsets_store_inferior_registers): Skip regsets
supply_register_by_name (regcache, "system_call", buf);
}
+static void
+s390_store_tdb (struct regcache *regcache, const void *buf)
+{
+ int tdb0 = find_regno (regcache->tdesc, "tdb0");
+ int tr0 = find_regno (regcache->tdesc, "tr0");
+ int i;
+
+ for (i = 0; i < 4; i++)
+ supply_register (regcache, tdb0 + i, (const char *) buf + 8 * i);
+
+ for (i = 0; i < 16; i++)
+ supply_register (regcache, tr0 + i, (const char *) buf + 8 * (16 + i));
+}
+
static struct regset_info s390_regsets[] = {
{ 0, 0, 0, 0, GENERAL_REGS, s390_fill_gregset, NULL },
/* Last break address is read-only; no fill function. */
NULL, s390_store_last_break },
{ PTRACE_GETREGSET, PTRACE_SETREGSET, NT_S390_SYSTEM_CALL, 0,
EXTENDED_REGS, s390_fill_system_call, s390_store_system_call },
+ /* TDB is read-only. */
+ { PTRACE_GETREGSET, -1, NT_S390_TDB, 0, EXTENDED_REGS,
+ NULL, s390_store_tdb },
{ 0, 0, 0, -1, -1, NULL, NULL }
};