This is the mail archive of the 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]

[PATCH 2/6] [C++] linux-thread-db.c: dladdr cast


 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)

2015-11-18  Pedro Alves  <>

	* linux-thread-db.c (try_thread_db_load_1): Add cast.
 gdb/linux-thread-db.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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]