This is the mail archive of the gdb-testers@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 sol-thread.c compilation on Solaris


*** TEST RESULTS FOR COMMIT e8020e54f4b9ac05150c4b02fa81e228d6cf1f6a ***

Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Branch: master
Commit: e8020e54f4b9ac05150c4b02fa81e228d6cf1f6a

Fix sol-thread.c compilation on Solaris

Building current gdb mainline with gcc 7.1 on Solaris 11.4 fails:

/vol/src/gnu/gdb/gdb/dist/gdb/sol-thread.c: In function `void _initialize_sol_thread()':
/vol/src/gnu/gdb/gdb/dist/gdb/sol-thread.c:1229:66: error: invalid conversion from `void (*)(char*, int)' to `void (*)(const char*, int)' [-fpermissive]
     _("Show info on Solaris user threads."), &maintenanceinfolist);
                                                                  ^
In file included from /vol/src/gnu/gdb/gdb/dist/gdb/completer.h:21:0,
                 from /vol/src/gnu/gdb/gdb/dist/gdb/symtab.h:31,
                 from /vol/src/gnu/gdb/gdb/dist/gdb/language.h:26,
                 from /vol/src/gnu/gdb/gdb/dist/gdb/frame.h:72,
                 from /vol/src/gnu/gdb/gdb/dist/gdb/gdbarch.h:39,
                 from /vol/src/gnu/gdb/gdb/dist/gdb/defs.h:557,
                 from /vol/src/gnu/gdb/gdb/dist/gdb/sol-thread.c:51:
/vol/src/gnu/gdb/gdb/dist/gdb/command.h:140:33: note:   initializing argument 3 of `cmd_list_element* add_cmd(const char*, command_class, void (*)(const char*, int), const char*, cmd_list_element**)'
 extern struct cmd_list_element *add_cmd (const char *, enum command_class,
                                 ^~~~~~~

The following patch allows compilation to succeed on i386-pc-solaris2.11
and sparc-sun-solaris2.11.

	* sol-thread.c (info_solthreads): Constify args.
	Cast args to void *.


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