# Patch required for Solaris.
# Will contribute upstream if possible; will need to #ifdef SOLARIS.
--- gdb-7.11-orig/gdb/regcache.c Tue Feb 9 19:19:39 2016
+++ gdb-7.11/gdb/regcache.c Thu Mar 10 16:31:27 2016
@@ -213,6 +213,8 @@
/* If this is a read-write cache, which thread's registers is
it connected to? */
ptid_t ptid;
+ /* Is this a corefile regcache or a live process */
+ int from_corefile;
};
static struct regcache *
@@ -227,6 +229,7 @@
regcache = XNEW (struct regcache);
regcache->descr = descr;
regcache->readonly_p = readonly_p;
+ regcache->from_corefile = 0;
if (readonly_p)
{
regcache->registers
@@ -1557,3 +1560,18 @@
&maintenanceprintlist);
}
+
+int
+set_regcache_from_corefile (struct regcache *regcache)
+{
+ gdb_assert (regcache != NULL);
+ regcache->from_corefile = 1;
+}
+
+int
+regcache_from_corefile (const struct regcache *regcache)
+{
+ gdb_assert (regcache != NULL);
+ return regcache->from_corefile;
+}
+