This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix compilation error in ia64-vms-tdep.c with libunwind-ia64


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ec74dcd894ce3087dad2b6d0da96c572d5e0c7c6

commit ec74dcd894ce3087dad2b6d0da96c572d5e0c7c6
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Mon Jul 16 14:15:09 2018 -0400

    Fix compilation error in ia64-vms-tdep.c with libunwind-ia64
    
    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.

Diff:
---
 gdb/ChangeLog       | 4 ++++
 gdb/ia64-vms-tdep.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e6bcd84..29b2e7e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
 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,
 	gdbsim_target::mourn_inferior): Remove unused variables.
 
diff --git a/gdb/ia64-vms-tdep.c b/gdb/ia64-vms-tdep.c
index e2d40e2..a62a66e 100644
--- a/gdb/ia64-vms-tdep.c
+++ b/gdb/ia64-vms-tdep.c
@@ -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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]