This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Fix sol-thread.c compilation on Solaris
- From: Pedro Alves <palves at redhat dot com>
- To: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>, gdb-patches at sourceware dot org
- Date: Tue, 28 Nov 2017 14:01:15 +0000
- Subject: Re: Fix sol-thread.c compilation on Solaris
- Authentication-results: sourceware.org; auth=none
- References: <ydd1skifsex.fsf@CeBiTec.Uni-Bielefeld.DE>
On 11/28/2017 01:23 PM, Rainer Orth wrote:
>
> # HG changeset patch
> # Parent d3867b61620919242bbc9d875d355487a4e71e96
> Fix sol-thread.c compilation on Solaris
>
> diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
> --- a/gdb/sol-thread.c
> +++ b/gdb/sol-thread.c
> @@ -112,7 +112,7 @@ typedef td_err_e (td_ta_get_nthreads_fty
> typedef td_err_e (td_ta_tsd_iter_ftype)(const td_thragent_t *ta_p,
> td_key_iter_f *cb, void *cbdata_p);
> typedef td_err_e (td_ta_thr_iter_ftype)(const td_thragent_t *ta_p,
> - td_thr_iter_f *cb, void *cbdata_p,
> + td_thr_iter_f *cb, const void *cbdata_p,
Pedantically, I'd think it better that this prototype
continues to match the prototype declared in Solaris's
proc_service.h (...)
> td_thr_state_e state, int ti_pri,
> sigset_t *ti_sigmask_p,
> unsigned ti_user_flags);
> @@ -1122,7 +1122,7 @@ info_cb (const td_thrhandle_t *th, void
> inferior. */
>
> static void
> -info_solthreads (char *args, int from_tty)
> +info_solthreads (const char *args, int from_tty)
> {
> p_td_ta_thr_iter (main_ta, info_cb, args,
> TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY,
(...) which I guess means using '(void *) args' here. WDYT?
Thanks,
Pedro Alves