aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-05-06 14:10:15 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-05-06 14:10:15 +0000
commitd817e0835325df6f30475004ac1e59bff863088a (patch)
tree4517996e4c402082440c32ce81b7ad16b932c14b /gdb
parent6a1872e49a9d6210fdc938dbc182f48f1070f262 (diff)
downloadgdb-d817e0835325df6f30475004ac1e59bff863088a.zip
gdb-d817e0835325df6f30475004ac1e59bff863088a.tar.gz
gdb-d817e0835325df6f30475004ac1e59bff863088a.tar.bz2
* m32r-linux-nat.c (supply_gregset): Do not modify contents
pointed to by GREGSETP.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/m32r-linux-nat.c12
2 files changed, 13 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bd8acfd..4190c4b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2007-05-06 Ulrich Weigand <uweigand@de.ibm.com>
+ * m32r-linux-nat.c (supply_gregset): Do not modify contents
+ pointed to by GREGSETP.
+
+2007-05-06 Ulrich Weigand <uweigand@de.ibm.com>
+
* irix5-nat.c (fill_gregset): Use regcache_raw_collect instead
of regcache_raw_read_signed.
(fill_fpregset): Use regcache_raw_collect instead of
diff --git a/gdb/m32r-linux-nat.c b/gdb/m32r-linux-nat.c
index 86b20bd..2b17aad 100644
--- a/gdb/m32r-linux-nat.c
+++ b/gdb/m32r-linux-nat.c
@@ -80,19 +80,23 @@ supply_gregset (elf_gregset_t * gregsetp)
for (i = 0; i < M32R_LINUX_NUM_REGS; i++)
{
+ elf_greg_t regval;
+
switch (i)
{
case PSW_REGNUM:
- *(regp + regmap[i]) =
- ((0x00c1 & bbpsw) << 8) | ((0xc100 & psw) >> 8);
+ regval = ((0x00c1 & bbpsw) << 8) | ((0xc100 & psw) >> 8);
break;
case CBR_REGNUM:
- *(regp + regmap[i]) = ((psw >> 8) & 1);
+ regval = ((psw >> 8) & 1);
+ break;
+ default:
+ regval = *(regp + regmap[i]);
break;
}
if (i != M32R_SP_REGNUM)
- regcache_raw_supply (current_regcache, i, regp + regmap[i]);
+ regcache_raw_supply (current_regcache, i, &regval);
else if (psw & 0x8000)
regcache_raw_supply (current_regcache, i, regp + SPU_REGMAP);
else