diff options
author | Pedro Alves <palves@redhat.com> | 2016-04-21 14:02:20 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-04-21 14:02:20 +0100 |
commit | 71829b1a3f9b4825150747b138b5cfadf0c5fcba (patch) | |
tree | d9e4ad43c55f752c16d1996775121a58bcf65fbc /gdb/aix-thread.c | |
parent | 3451269c4128c4b74f4614d9781cb75207c5ee34 (diff) | |
download | gdb-71829b1a3f9b4825150747b138b5cfadf0c5fcba.zip gdb-71829b1a3f9b4825150747b138b5cfadf0c5fcba.tar.gz gdb-71829b1a3f9b4825150747b138b5cfadf0c5fcba.tar.bz2 |
Fix AIX gdb build with C++ compiler
We currently get:
../../src/gdb/aix-thread.c: In function 'int pdc_read_data(pthdb_user_t, void*, pthdb_addr_t, size_t)':
../../src/gdb/aix-thread.c:465:46: error: invalid conversion from 'void*' to 'gdb_byte* {aka unsigned char*}' [-fpermissive]
status = target_read_memory (addr, buf, len);
^
../../src/gdb/aix-thread.c: In function 'void aix_thread_resume(target_ops*, ptid_t, int, gdb_signal)':
../../src/gdb/aix-thread.c:1010:46: error: invalid conversion from 'void*' to 'int*' [-fpermissive]
gdb_signal_to_host (sig), (void *) tid);
^
../../src/gdb/aix-thread.c:243:1: error: initializing argument 5 of 'int ptrace64aix(int, int, long long int, int, int*)' [-fpermissive]
ptrace64aix (int req, int id, long long addr, int data, int *buf)
../../src/gdb/rs6000-nat.c: In function 'gdb_byte* rs6000_ptrace_ldinfo(ptid_t)':
../../src/gdb/rs6000-nat.c:596:36: error: invalid conversion from 'void*' to 'gdb_byte* {aka unsigned char*}' [-fpermissive]
gdb_byte *ldi = xmalloc (ldi_size);
^
../../src/gdb/rs6000-nat.c:615:36: error: invalid conversion from 'void*' to 'gdb_byte* {aka unsigned char*}' [-fpermissive]
ldi = xrealloc (ldi, ldi_size);
^
(and more instances of the same).
gdb/ChangeLog:
2016-04-21 Pedro Alves <palves@redhat.com>
* aix-thread.c (pdc_read_data, pdc_write_data): Add cast.
(aix_thread_resume): Use PTRACE_TYPE_ARG5.
* rs6000-nat.c (rs6000_ptrace64): Use PTRACE_TYPE_ARG5.
(rs6000_ptrace_ldinfo): Change type of 'ldi' local to void
pointer, and cast return to gdb_byte pointer.
Diffstat (limited to 'gdb/aix-thread.c')
-rw-r--r-- | gdb/aix-thread.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c index 1114046..693d6f6 100644 --- a/gdb/aix-thread.c +++ b/gdb/aix-thread.c @@ -462,7 +462,7 @@ pdc_read_data (pthdb_user_t user, void *buf, "pdc_read_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n", user, (long) buf, hex_string (addr), len); - status = target_read_memory (addr, buf, len); + status = target_read_memory (addr, (gdb_byte *) buf, len); ret = status == 0 ? PDC_SUCCESS : PDC_FAILURE; if (debug_aix_thread) @@ -484,7 +484,7 @@ pdc_write_data (pthdb_user_t user, void *buf, "pdc_write_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n", user, (long) buf, hex_string (addr), len); - status = target_write_memory (addr, buf, len); + status = target_write_memory (addr, (gdb_byte *) buf, len); ret = status == 0 ? PDC_SUCCESS : PDC_FAILURE; if (debug_aix_thread) @@ -1007,10 +1007,10 @@ aix_thread_resume (struct target_ops *ops, if (arch64) ptrace64aix (PTT_CONTINUE, tid[0], (long long) 1, - gdb_signal_to_host (sig), (void *) tid); + gdb_signal_to_host (sig), (PTRACE_TYPE_ARG5) tid); else ptrace32 (PTT_CONTINUE, tid[0], (addr_ptr) 1, - gdb_signal_to_host (sig), (void *) tid); + gdb_signal_to_host (sig), (PTRACE_TYPE_ARG5) tid); } } |