aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2015-11-16 14:47:50 +0000
committerYao Qi <yao.qi@linaro.org>2015-11-16 14:47:50 +0000
commit0d1993c072e5617b69204aef641acd2385b080ec (patch)
tree06804dd8b9feec01eac2a8f3b57b367ecd3053dd
parentef9bd0b8d7d0a70f9fa9b239a03099c57eb5ceea (diff)
downloadgdb-0d1993c072e5617b69204aef641acd2385b080ec.zip
gdb-0d1993c072e5617b69204aef641acd2385b080ec.tar.gz
gdb-0d1993c072e5617b69204aef641acd2385b080ec.tar.bz2
Use value_contents instead of value_contents_writeable
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.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/aarch64-tdep.c2
-rw-r--r--gdb/bfin-tdep.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2b2409a..b445cec 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
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
to buf. Pass buf instead of val to push_stack_item.
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index bc282e9..553a420 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -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
diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index 1d48225..54936cc 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -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. */