summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2004-05-10 16:53:56 +0000
committerJim Blandy <jimb@codesourcery.com>2004-05-10 16:53:56 +0000
commitc4ed68c787c9e26ce9e1b0606a7241701d927009 (patch)
treeb9484cb49bc75fa8b3d40112b64738f8e256a82e
parentd52642887bbc75ae76cb8f93a666bd072a56ee31 (diff)
downloadgdb-c4ed68c787c9e26ce9e1b0606a7241701d927009.tar.gz
* rs6000-tdep.c (ppc_collect_gregset): When regnum == -1, do
collect all the gprs.
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/rs6000-tdep.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b72f6304f93..654d11bbf64 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2004-05-10 Jim Blandy <jimb@redhat.com>
+ * rs6000-tdep.c (ppc_collect_gregset): When regnum == -1, do
+ collect all the gprs.
+
* rs6000-tdep.c (ppc_collect_gregset): Correct off-by-one error in
loop collecting gprs.
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 68e90a3c66b..4ce8fa1ae37 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -260,7 +260,7 @@ ppc_collect_gregset (const struct regset *regset,
for (i = 0; i < 32; i++, offset += 4)
{
if (regnum == -1 || regnum == i)
- ppc_collect_reg (regcache, regnum, gregs, offset);
+ ppc_collect_reg (regcache, i, gregs, offset);
}
if (regnum == -1 || regnum == PC_REGNUM)