Fix compilation error in ia64-vms-tdep.c with libunwind-ia64
authorSimon Marchi <simon.marchi@ericsson.com>
Mon, 16 Jul 2018 18:15:09 +0000 (14:15 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Mon, 16 Jul 2018 18:15:37 +0000 (14:15 -0400)
I found this when doing a --enable-targets=all build with libunwind-ia64
properly configured.

  CXX    ia64-vms-tdep.o
/home/emaisin/src/binutils-gdb/gdb/ia64-vms-tdep.c: In function ‘int ia64_vms_find_proc_info_x(unw_addr_space_t, unw_word_t, unw_proc_info_t*, int, void*)’:
/home/emaisin/src/binutils-gdb/gdb/ia64-vms-tdep.c:79:33: error: invalid conversion from ‘void*’ to ‘gdb_byte* {aka unsigned char*}’ [-fpermissive]
                             pi->unwind_info, pi->unwind_info_size);
                                 ^
In file included from /home/emaisin/src/binutils-gdb/gdb/target.h:70:0,
                 from /home/emaisin/src/binutils-gdb/gdb/exec.h:23,
                 from /home/emaisin/src/binutils-gdb/gdb/gdbcore.h:29,
                 from /home/emaisin/src/binutils-gdb/gdb/ia64-vms-tdep.c:25:
/home/emaisin/src/binutils-gdb/gdb/target/target.h:35:12: note:   initializing argument 2 of ‘int target_read_memory(CORE_ADDR, gdb_byte*, ssize_t)’
 extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr,
            ^

gdb/ChangeLog:

* ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.

gdb/ChangeLog
gdb/ia64-vms-tdep.c

index e6bcd84c98a1804602793af2c074049b004e52c3..29b2e7edc1c7eb0f68112fad08bd6c75da2533a8 100644 (file)
@@ -1,3 +1,7 @@
+2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
+
 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
 
        * remote-sim.c (gdbsim_target::close,
index e2d40e2079ba89b618679cd578b44d3a620c39c8..a62a66eb180412f976d00625390ef1919045d26e 100644 (file)
@@ -76,7 +76,7 @@ ia64_vms_find_proc_info_x (unw_addr_space_t as, unw_word_t ip,
   pi->unwind_info = xmalloc (pi->unwind_info_size);
 
   res = target_read_memory (table_addr + 8,
-                            pi->unwind_info, pi->unwind_info_size);
+                            (gdb_byte *) pi->unwind_info, pi->unwind_info_size);
   if (res != 0)
     {
       xfree (pi->unwind_info);