From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20939 invoked by alias); 29 Nov 2017 14:07:55 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 20925 invoked by uid 89); 29 Nov 2017 14:07:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-21.7 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_2,GIT_PATCH_3,KB_WAM_FROM_NAME_SINGLEWORD,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=blocking, Makes X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 Nov 2017 14:07:53 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2E831C04FF87; Wed, 29 Nov 2017 14:07:52 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86ACB5C8A2; Wed, 29 Nov 2017 14:07:51 +0000 (UTC) Subject: Re: Fix sol-thread.c compilation on Solaris To: Rainer Orth References: <18ebfbc6-c73a-6aea-7fb8-ad30eef06d1e@redhat.com> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <6a8d5ab1-9c19-c395-7677-21657ea30cb2@redhat.com> Date: Wed, 29 Nov 2017 14:07:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-11/txt/msg00771.txt.bz2 On 11/29/2017 01:26 PM, Rainer Orth wrote: > Hi Pedro, > >> 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 (...) > > indeed: has > > td_err_e > td_ta_thr_iter(const td_thragent_t *, td_thr_iter_f *, void *, > td_thr_state_e, int, sigset_t *, unsigned); > > i.e. without the const. > >>> @@ -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? > > Makes sense. The resulting patch works just as well. OK. BTW, while you're here, I believe there's nothing blocking the "Remove ioctl-based procfs support on Solaris" patch at this point, right? Thanks, Pedro Alves