aboutsummaryrefslogtreecommitdiff
path: root/gdb/spu-linux-nat.c
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2016-05-04 19:42:09 -0400
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2016-05-04 19:42:09 -0400
commitc1aebf87fd3887ae02e5e62fb41889c9fa37a8a9 (patch)
tree5f5a45a2e9f46cb728cee4902c4893ec83e77417 /gdb/spu-linux-nat.c
parentc3fbf828add04de391d40883e4bdaf51500300d1 (diff)
downloadgdb-c1aebf87fd3887ae02e5e62fb41889c9fa37a8a9.zip
gdb-c1aebf87fd3887ae02e5e62fb41889c9fa37a8a9.tar.gz
gdb-c1aebf87fd3887ae02e5e62fb41889c9fa37a8a9.tar.bz2
[spu] Fix C++ build problems
ChangeLog: * spu-linux-nat.c (spu_bfd_iovec_pread): Add pointer cast for C++. (spu_bfd_open): Likewise. gdbserver/ChangeLog: * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value used as first ptrace argument to PTRACE_TYPE_ARG1 for C++. (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
Diffstat (limited to 'gdb/spu-linux-nat.c')
-rw-r--r--gdb/spu-linux-nat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/spu-linux-nat.c b/gdb/spu-linux-nat.c
index 8d4dee3..f1d58ec 100644
--- a/gdb/spu-linux-nat.c
+++ b/gdb/spu-linux-nat.c
@@ -296,7 +296,7 @@ spu_bfd_iovec_pread (struct bfd *abfd, void *stream, void *buf,
{
ULONGEST addr = *(ULONGEST *)stream;
- if (fetch_ppc_memory (addr + offset, buf, nbytes) != 0)
+ if (fetch_ppc_memory (addr + offset, (gdb_byte *)buf, nbytes) != 0)
{
bfd_set_error (bfd_error_invalid_operation);
return -1;
@@ -347,7 +347,7 @@ spu_bfd_open (ULONGEST addr)
int sect_size = bfd_section_size (nbfd, spu_name);
if (sect_size > 20)
{
- char *buf = alloca (sect_size - 20 + 1);
+ char *buf = (char *)alloca (sect_size - 20 + 1);
bfd_get_section_contents (nbfd, spu_name, buf, 20, sect_size - 20);
buf[sect_size - 20] = '\0';