This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Use value_contents instead of value_contents_writeable
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 13 Nov 2015 09:59:08 +0000
- Subject: [PATCH] Use value_contents instead of value_contents_writeable
- Authentication-results: sourceware.org; auth=none
Both aarch64_push_dummy_call and bfin_push_dummy_call only use value
contents but then never write to them, so that we can use
value_contents instead.
Regression tested on aarch64-linux only. No bfin box to test.
gdb:
2015-11-13 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/aarch64-tdep.c | 2 +-
gdb/bfin-tdep.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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. */
--
1.9.1