aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2006-05-06 01:12:11 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2006-05-06 01:12:11 +0000
commit92f38ec2e1e1270e145474d983ef3dfa9f1685a2 (patch)
tree6ca04480ab90b78aa9538cfa083f599c0cf60f36 /gdb
parent875dc2fc84a3180e7bed10203a541363ae327233 (diff)
downloadgdb-92f38ec2e1e1270e145474d983ef3dfa9f1685a2.zip
gdb-92f38ec2e1e1270e145474d983ef3dfa9f1685a2.tar.gz
gdb-92f38ec2e1e1270e145474d983ef3dfa9f1685a2.tar.bz2
* s390-tdep.c (s390_collect_regset): New function.
(s390_gregset, s390x_gregset, s390_fpregset): Add it.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/s390-tdep.c28
2 files changed, 30 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9897b5d..9655109 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-06 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * s390-tdep.c (s390_collect_regset): New function.
+ (s390_gregset, s390x_gregset, s390_fpregset): Add it.
+
2006-05-06 Nick Roberts <nickrob@snap.net.nz>
* dwarf2read.c: Make LOC_OPTIMIZED_OUT the default value for a
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 4018ad1..b7b372d 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -444,19 +444,41 @@ s390_supply_regset (const struct regset *regset, struct regcache *regcache,
}
}
+/* Collect register REGNUM from the register cache REGCACHE and store
+ it in the buffer specified by REGS and LEN as described by the
+ general-purpose register set REGSET. If REGNUM is -1, do this for
+ all registers in REGSET. */
+static void
+s390_collect_regset (const struct regset *regset,
+ const struct regcache *regcache,
+ int regnum, void *regs, size_t len)
+{
+ const int *offset = regset->descr;
+ int i;
+
+ for (i = 0; i < S390_NUM_REGS; i++)
+ {
+ if ((regnum == i || regnum == -1) && offset[i] != -1)
+ regcache_raw_collect (regcache, i, (char *)regs + offset[i]);
+ }
+}
+
static const struct regset s390_gregset = {
s390_regmap_gregset,
- s390_supply_regset
+ s390_supply_regset,
+ s390_collect_regset
};
static const struct regset s390x_gregset = {
s390x_regmap_gregset,
- s390_supply_regset
+ s390_supply_regset,
+ s390_collect_regset
};
static const struct regset s390_fpregset = {
s390_regmap_fpregset,
- s390_supply_regset
+ s390_supply_regset,
+ s390_collect_regset
};
/* Return the appropriate register set for the core section identified