From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id pPCaLEfhfmq2IiUAWB0awg (envelope-from ) for ; Fri, 14 Aug 2026 05:35:03 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=N1cy6fgL; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 9E44A1E0A3; Fri, 14 Aug 2026 05:35:03 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id BE08E1E033 for ; Fri, 14 Aug 2026 05:35:01 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D836F4BA7983 for ; Fri, 14 Aug 2026 09:35:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D836F4BA7983 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=N1cy6fgL Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id B04DD4BA7983 for ; Fri, 14 Aug 2026 09:34:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B04DD4BA7983 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cebitec.uni-bielefeld.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B04DD4BA7983 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=129.70.160.84 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786700068; cv=none; b=cMibrPhByzI9O3UZmj4KPN8a51U3Mw7++oWa9jPOppe1NFJ3xMypQNPLnrHLwRTUjBN2L0kTU72v8S9nBS0P5ApeSzi+/t/HA/9At+ZQerm6PQ/kxvGB2fjwRifhqzJ74IaGIp7jtZP6J4CvlMHhPAeDQcLcx65TjK6Cyr1t5cE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786700068; c=relaxed/simple; bh=IxXX7uUPqCSTTIShk5mA17gkwpAqUGPIujLUKBBle+I=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=tSxpQh7adlvJgH8arxFCD9V7w8ksFamsRrerPlHuK/nsGcGaU8CE14xduDLK7JamSqj184yS2FZG0IABGkIGv/AfPDptXtu3d0LOFVcayT7riTh1KcyyQyYIHq9pIxIfBh6ft7wten/DzZ4gIYVCsgS7ibQ4w9qwXKsyNsJMFSI= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=N1cy6fgL DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B04DD4BA7983 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 5CA59DB2A3; Fri, 14 Aug 2026 11:34:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= cebitec.uni-bielefeld.de; h=content-type:content-type :mime-version:user-agent:message-id:date:date:subject:subject :from:from:received:received; s=20200306; t=1786700054; bh=IxXX7 uUPqCSTTIShk5mA17gkwpAqUGPIujLUKBBle+I=; b=N1cy6fgLc2QvZU4ZBUhJy KW5POprEwsiLIz3Y5ebQkEcYkR/V1havRCf2FZyAyGreiJXwrjRc35XKDkzhOKml fjay6+L/UcL7Mp7jxt+Ukrb44Yu0SDpVJJrZZaEez+4xcZPtT2MhEfPNar4iTKV6 NfegcFjRNlL3An1E6dIU8qiCNhT9WN0JAbob0lP8wpfIz7vQIj2joo9EbZ1uoalD GGoYyhHCNb6FHflFQK3/4f/1Z6W1+boFJJ+kuLkYCnx0aQ/YaVL1xk3lMaz9VdMZ ZUQwmxK2IjbzxqnK13ub5+LF553LEmazp86KF6chSTUuX2od56v59lkEaLBKdJcw w== X-Virus-Scanned: amavisd-new at cebitec.uni-bielefeld.de Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id m93_aZBHpLOt; Fri, 14 Aug 2026 11:34:14 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p508553da.dip0.t-ipconnect.de [80.133.83.218]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id DD1D9DB1F0; Fri, 14 Aug 2026 11:34:14 +0200 (CEST) From: Rainer Orth To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH] Fix procfs.c compilation on Solaris Date: Fri, 14 Aug 2026 11:34:14 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable procfs.c doesn't compile on trunk and the gdb-18 branch: procfs.c: In function =E2=80=98int procfs_notice_thread(procinfo*, procinfo= *, void*)=E2=80=99: procfs.c:2857:33: error: invalid use of non-static member function =E2=80= =98thread_state thread_info::state() const=E2=80=99 2857 | if (thr =3D=3D NULL || thr->state =3D=3D THREAD_EXITED) | ~~~~~~~~~~~^~~~~~~~~~~~~~~~ Fixed by calling the member function. procfs.c: In function =E2=80=98bool find_memory_regions_callback(prmap*, fi= nd_memory_region_ftype)=E2=80=99: procfs.c:3152:15: error: no match for call to =E2=80=98(find_memory_region_= ftype {aka gdb::function_view}) (CORE_ADDR, std::size_t&, bool, bool, = bool, bool, bool)=E2=80=99 3152 | return func ((CORE_ADDR) map->pr_vaddr, | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ 3153 | map->pr_size, | ~~~~~~~~~~~~~ 3154 | (map->pr_mflags & MA_READ) !=3D 0, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3155 | (map->pr_mflags & MA_WRITE) !=3D 0, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3156 | (map->pr_mflags & MA_EXEC) !=3D 0, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3157 | true, /* MODIFIED is unknown, pass it as true. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3158 | false); | ~~~~~~ Fixed by passing the new HOLE arg. procfs.c: In function =E2=80=98void info_proc_mappings(procinfo*, int)=E2= =80=99: procfs.c:3257:25: error: too many arguments to function =E2=80=98bool itera= te_over_mappings(procinfo*, find_memory_region_ftype, bool (*)(prmap*, find= _memory_region_ftype))=E2=80=99 3257 | iterate_over_mappings (pi, NULL, NULL, info_mappings_callback); | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixed by removing the unused arg. Tested on sparcv9-sun-solaris2.11 and amd64-pc-solaris2.11 with results similar to the gdb-17 ones. Committed to trunk. This patch should also go to the gdb-18 branch: I'm not sure if I should just commit it or it needs approval. Besides, this has happened repeatedly over the last couple of years, so I'm now working to set up Solaris/sparcv9 and amd64 builders parallel to the recent binutils-solaris11-* ones so failures are noticed early. There are a few issues with the subset of patches run by the gdb builders: I'll report once I'm closer to clean results. Rainer --=20 ---------------------------------------------------------------------------= -- Rainer Orth, Center for Biotechnology, Bielefeld University --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=gdb-18.patch diff --git a/gdb/procfs.c b/gdb/procfs.c --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -2854,7 +2854,7 @@ procfs_notice_thread (procinfo *pi, proc ptid_t gdb_threadid = ptid_t (pi->pid, thread->tid, 0); thread_info *thr = the_procfs_target.find_thread (gdb_threadid); - if (thr == NULL || thr->state == THREAD_EXITED) + if (thr == NULL || thr->state () == THREAD_EXITED) add_thread (&the_procfs_target, gdb_threadid); return 0; @@ -3155,7 +3155,7 @@ find_memory_regions_callback (struct prm (map->pr_mflags & MA_WRITE) != 0, (map->pr_mflags & MA_EXEC) != 0, true, /* MODIFIED is unknown, pass it as true. */ - false); + false, false); } /* External interface. Calls a callback function once for each @@ -3205,8 +3205,7 @@ mappingflags (long flags) mappings'. */ static bool -info_mappings_callback (struct prmap *map, find_memory_region_ftype ignore, - void *unused) +info_mappings_callback (struct prmap *map, find_memory_region_ftype ignore) { unsigned int pr_off; @@ -3254,7 +3253,7 @@ info_proc_mappings (procinfo *pi, int su " Offset", "Flags"); - iterate_over_mappings (pi, NULL, NULL, info_mappings_callback); + iterate_over_mappings (pi, NULL, info_mappings_callback); gdb_printf ("\n"); } --=-=-=--