diff options
author | Pedro Alves <palves@redhat.com> | 2016-04-21 06:42:13 -0400 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-04-21 12:03:53 +0100 |
commit | 3451269c4128c4b74f4614d9781cb75207c5ee34 (patch) | |
tree | b03d165bd6a8825826c30e852333a3701a0f529a /gdb/s390-linux-nat.c | |
parent | b36cec19e826c19648964576ef2d20d63f99e888 (diff) | |
download | gdb-3451269c4128c4b74f4614d9781cb75207c5ee34.zip gdb-3451269c4128c4b74f4614d9781cb75207c5ee34.tar.gz gdb-3451269c4128c4b74f4614d9781cb75207c5ee34.tar.bz2 |
Fix s390 GNU/Linux gdb and gdbserver builds
Now that gdb/gdbserver compile as C++ programs by default, the s390
GNU/Linux build started failing with:
In file included from ../../src/gdb/common/common-defs.h:64:0,
from ../../src/gdb/defs.h:28,
from ../../src/gdb/s390-linux-nat.c:22:
../../src/gdb/s390-linux-nat.c: In function ‘void fetch_regset(regcache*, int, int, int, const regset*)’:
../../src/gdb/../include/libiberty.h:711:38: error: invalid conversion from ‘void*’ to ‘gdb_byte* {aka unsigned char*}’ [-fpermissive]
# define alloca(x) __builtin_alloca(x)
^
../../src/gdb/s390-linux-nat.c:297:19: note: in expansion of macro ‘alloca’
gdb_byte *buf = alloca (regsize);
^
etc.
gdb/ChangeLog:
2016-04-21 Pedro Alves <palves@redhat.com>
* s390-linux-nat.c (fetch_regset, store_regset, check_regset): Use
void * instead of gdb_byte *.
gdb/gdbserver/ChangeLog:
2016-04-21 Pedro Alves <palves@redhat.com>
* linux-s390-low.c (s390_collect_ptrace_register)
(s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
add casts.
(s390_check_regset): Use void * instead of gdb_byte *.
Diffstat (limited to 'gdb/s390-linux-nat.c')
-rw-r--r-- | gdb/s390-linux-nat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c index ae0e2c6..e91297b 100644 --- a/gdb/s390-linux-nat.c +++ b/gdb/s390-linux-nat.c @@ -294,7 +294,7 @@ static void fetch_regset (struct regcache *regcache, int tid, int regset_id, int regsize, const struct regset *regset) { - gdb_byte *buf = alloca (regsize); + void *buf = alloca (regsize); struct iovec iov; iov.iov_base = buf; @@ -318,7 +318,7 @@ static void store_regset (struct regcache *regcache, int tid, int regset_id, int regsize, const struct regset *regset) { - gdb_byte *buf = alloca (regsize); + void *buf = alloca (regsize); struct iovec iov; iov.iov_base = buf; @@ -338,7 +338,7 @@ store_regset (struct regcache *regcache, int tid, static int check_regset (int tid, int regset, int regsize) { - gdb_byte *buf = alloca (regsize); + void *buf = alloca (regsize); struct iovec iov; iov.iov_base = buf; |