From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74757 invoked by alias); 26 Sep 2017 14:03:38 -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 74733 invoked by uid 89); 26 Sep 2017 14:03:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=hurray 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; Tue, 26 Sep 2017 14:03:24 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F3C6F1F593; Tue, 26 Sep 2017 14:03:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F3C6F1F593 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves@redhat.com 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 4F2BD7049C; Tue, 26 Sep 2017 14:03:22 +0000 (UTC) Subject: Re: Remove ioctl-based procfs support on Solaris To: Rainer Orth , gdb-patches@sourceware.org References: From: Pedro Alves Message-ID: <7af9e9eb-62cd-ce53-173b-a12c3d6c0bd5@redhat.com> Date: Tue, 26 Sep 2017 14:03: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-09/txt/msg00801.txt.bz2 On 09/26/2017 01:23 PM, Rainer Orth wrote: > This is the previously mentioned patch to get rid of > unstructured/ioctl-based procfs support in procfs.c. Given that support > for structured procfs was introduced in Solaris 2.6 back in 1997 and > we're just removing support for Solaris < 10, there's no point in > carrying that baggage (and tons of support for IRIX and OSF/11 as well) > around any longer. > > Most of the patch should be straightforward (removing support for > !NEW_PROC_API, non-Solaris OSes and pre-Solaris 10 quirks). > > Only a few points need explanations: > > * was already included unconditionally in most places, > so there's no need to have guards in a few remaining ones. > > * configure.host already obsoletes i?86-*-sysv4.2, i?86-*-sysv5, so > NEW_PROC_API detection for those in configure.ac can go. > > * I'm still including with #define _STRUCTURED_PROC 1. > Theoretically, it would be better to include on Solaris > (which includes that define), but that breaks the build over > vs. gdb's "procfs.h", and doesn't exist on Linux. > > * I've regenerated syscall_table[] in proc-events.c with a small script > from Solaris 10, 11.3, 11.4 , so there should be no > traces of older Solaris versions and other OSes left. > > * prsysent_t and DYNAMIC_SYSCALLS was only used for AIX 5, but AIX > doesn't use procfs.c any longer, so all related code can go. > > The patch was generated with diff -w so one can easier see changes > without being distracted by simple reindentations. > Awesome, perfect intro. You've preemptively answered any question that I might have. And thanks much for diff -w! > So far, it has only been compiled and smoke-tested on > amd64-pc-solaris2.1[01], sparcv9-sun-solaris2.1[01], and > x86_64-pc-linux-gnu. Certainly needs more testing (Solaris 11.3 > vs. 11.4, 32-bit gdb, testsuite once I've figured out what's wrong on > Solaris 10 etc.), but it's enough to get a first impression how much > cleanup is possible here. Hurray! This all looks good to me FWIW, with a couple tiny nits below. > /proc file system, which is used on many versions of Unix > as a means for debuggers to control other processes. Could you update this comment in procfs.c to mention Solaris explicitly, please? Likewise the first line of the file. > > - Examples of the systems that use this interface are: > - > - Irix > - Solaris > - OSF > - AIX5 ... > - There are three methods for doing this function: > - 1) Newest: read/write [PCSET/PCRESET/PCUNSET] > - [Sol6, Sol7, UW] > - 2) Middle: PIOCSET/PIOCRESET > - [Irix, Sol5] > - 3) Oldest: PIOCSFORK/PIOCRFORK/PIOCSRLC/PIOCRRLC > - [OSF, Sol5] > - > - Note: Irix does not define PR_ASYNC. > - Note: OSF does not define PR_KLC. > - Note: OSF is the only one that can ONLY use the oldest method. > + This function is done using read/write [PCSET/PCRESET/PCUNSET] [Sol6, Sol7]. I think the "[Sol6, Sol7]" above referred to Solaris 2.6-7. Should we remove that? Thanks, Pedro Alves