This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] lm32: Replace call to write_memory with write_memory_unsigned_integer
- From: Simon Marchi <simark at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 13 Oct 2015 17:37:27 -0000
- Subject: [binutils-gdb] lm32: Replace call to write_memory with write_memory_unsigned_integer
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4666fec3b414c7880e9629f3c9b0a5b584235c6d
commit 4666fec3b414c7880e9629f3c9b0a5b584235c6d
Author: Simon Marchi <simon.marchi@ericsson.com>
Date: Tue Oct 13 13:37:13 2015 -0400
lm32: Replace call to write_memory with write_memory_unsigned_integer
Fixes this error:
/home/emaisin/src/binutils-gdb/gdb/lm32-tdep.c: In function â??CORE_ADDR lm32_push_dummy_call(gdbarch*, value*, regcache*, CORE_ADDR, int, value**, CORE_ADDR, int, CORE_ADDR)â??:
/home/emaisin/src/binutils-gdb/gdb/lm32-tdep.c:292:59: error: invalid conversion from â??void*â?? to â??const gdb_byte* {aka const unsigned char*}â?? [-fpermissive]
write_memory (sp, (void *) &val, TYPE_LENGTH (arg_type));
^
In file included from /home/emaisin/src/binutils-gdb/gdb/lm32-tdep.c:29:0:
/home/emaisin/src/binutils-gdb/gdb/gdbcore.h:107:13: error: initializing argument 2 of â??void write_memory(CORE_ADDR, const gdb_byte*, ssize_t)â?? [-fpermissive]
extern void write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr,
^
gdb/ChangeLog:
* lm32-tdep.c (lm32_push_dummy_call): Replace call to
write_memory with write_memory_unsigned_integer.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/lm32-tdep.c | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e96aa7c..54fc96a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-13 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * lm32-tdep.c (lm32_push_dummy_call): Replace call to
+ write_memory with write_memory_unsigned_integer.
+
2015-10-13 Simon Marchi <thundersim@gmail.com>
* solib-dsbt.c (cmp_name): Constify arguments.
diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c
index 25a7e1e..2dcc9a3 100644
--- a/gdb/lm32-tdep.c
+++ b/gdb/lm32-tdep.c
@@ -289,7 +289,8 @@ lm32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
regcache_cooked_write_unsigned (regcache, first_arg_reg + i, val);
else
{
- write_memory (sp, (void *) &val, TYPE_LENGTH (arg_type));
+ write_memory_unsigned_integer (sp, TYPE_LENGTH (arg_type), byte_order,
+ val);
sp -= 4;
}
}