Use value_contents instead of value_contents_writeable
authorYao Qi <yao.qi@linaro.org>
Mon, 16 Nov 2015 14:47:50 +0000 (14:47 +0000)
committerYao Qi <yao.qi@linaro.org>
Mon, 16 Nov 2015 14:47:50 +0000 (14:47 +0000)
Both aarch64_push_dummy_call and bfin_push_dummy_call only use args[i]
contents but then never write to them, so that we can use
value_contents instead.

gdb:

2015-11-16  Yao Qi  <yao.qi@linaro.org>

* aarch64-tdep.c (aarch64_push_dummy_call): Call value_contents instead
of value_contents_writeable.
* bfin-tdep.c (bfin_push_dummy_call): Likewise.

gdb/ChangeLog
gdb/aarch64-tdep.c
gdb/bfin-tdep.c

index 2b2409a4271db990a59c49f10897d0c48b0adeba..b445ceca9b4fb416aa4c90dcc154aa7ccdd8d436 100644 (file)
@@ -1,3 +1,9 @@
+2015-11-16  Yao Qi  <yao.qi@linaro.org>
+
+       * aarch64-tdep.c (aarch64_push_dummy_call): Call value_contents
+       instead of value_contents_writeable.
+       * bfin-tdep.c (bfin_push_dummy_call): Likewise.
+
 2015-11-16  Yao Qi  <yao.qi@linaro.org>
 
        * arm-tdep.c (arm_push_dummy_call): New array buf.  Store regval
index bc282e97bf0ec7784d24d8f541c28977d93a8356..553a4205d10da6ab0c3063c4a50f478dd6aef022 100644 (file)
@@ -1300,7 +1300,7 @@ aarch64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
                        check_typedef (value_type (field));
 
                      pass_in_v_or_stack (gdbarch, regcache, &info, field_type,
-                                         value_contents_writeable (field));
+                                         value_contents (field));
                    }
                }
              else
index 1d48225b420f2f5b6e629527a62ec5c30bc860de..54936cc6f07c828e3f9bf1b6935e8e18a1d2cd69 100644 (file)
@@ -531,7 +531,7 @@ bfin_push_dummy_call (struct gdbarch *gdbarch,
       int container_len = (TYPE_LENGTH (value_type) + 3) & ~3;
 
       sp -= container_len;
-      write_memory (sp, value_contents_writeable (args[i]), container_len);
+      write_memory (sp, value_contents (args[i]), container_len);
     }
 
   /* Initialize R0, R1, and R2 to the first 3 words of parameters.  */