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] [C++] linux-thread-db.c: dladdr cast


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

commit f8708a14262c9abe0a6823de4470f5710374fe40
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Nov 19 14:32:53 2015 +0000

    [C++] linux-thread-db.c: dladdr cast
    
    Fixes:
    
     src/gdb/linux-thread-db.c: In function â??int try_thread_db_load_1(thread_db_info*)â??:
     src/gdb/linux-thread-db.c:769:53: error: invalid conversion from â??td_err_e (*)(ps_prochandle*, td_thragent_t**) {aka td_err_e (*)(ps_prochandle*, td_thragent**)}â?? to â??const void*â?? [-fpermissive]
    	library = dladdr_to_soname (*info->td_ta_new_p);
    						      ^
     src/gdb/linux-thread-db.c:637:1: error:   initializing argument 1 of â??const char* dladdr_to_soname(const void*)â?? [-fpermissive]
      dladdr_to_soname (const void *addr)
      ^
    
    gdb/ChangeLog:
    2015-11-19  Pedro Alves  <palves@redhat.com>
    
    	* linux-thread-db.c (try_thread_db_load_1): Add cast.

Diff:
---
 gdb/ChangeLog         | 4 ++++
 gdb/linux-thread-db.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e6d7aac..223b860 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
 2015-11-19  Pedro Alves  <palves@redhat.com>
 
+	* linux-thread-db.c (try_thread_db_load_1): Add cast.
+
+2015-11-19  Pedro Alves  <palves@redhat.com>
+
 	* remote.c (remote_unpush_target): Use
 	pop_all_targets_at_and_above instead of pop_all_targets_above.
 	* target.c (unpush_target_and_assert): New function, factored out
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 41db29a..229bb0b 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -766,7 +766,7 @@ try_thread_db_load_1 (struct thread_db_info *info)
       struct ui_file *file;
       const char *library;
 
-      library = dladdr_to_soname (*info->td_ta_new_p);
+      library = dladdr_to_soname ((const void *) *info->td_ta_new_p);
       if (library == NULL)
 	library = LIBTHREAD_DB_SO;


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