* m32r-linux-nat.c (supply_gregset): Do not modify contents
authorUlrich Weigand <uweigand@de.ibm.com>
Sun, 6 May 2007 14:10:15 +0000 (14:10 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Sun, 6 May 2007 14:10:15 +0000 (14:10 +0000)
pointed to by GREGSETP.

gdb/ChangeLog
gdb/m32r-linux-nat.c

index bd8acfd4422d5bef54f46fd54139e6b8cca2f6c5..4190c4ba6233c0e846343ae3f38a079e4602da30 100644 (file)
@@ -1,3 +1,8 @@
+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
index 86b20bda29ef39471afb5bf62028dcf44a4ad6ce..2b17aadf2fee0146f5969a0b873ee342c6ce3fc3 100644 (file)
@@ -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
This page took 0.027497 seconds and 4 git commands to generate.