From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22249 invoked by alias); 22 Dec 2011 19:25:40 -0000 Received: (qmail 22233 invoked by uid 22791); 22 Dec 2011 19:25:39 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from elasmtp-scoter.atl.sa.earthlink.net (HELO elasmtp-scoter.atl.sa.earthlink.net) (209.86.89.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Dec 2011 19:25:26 +0000 Received: from [70.170.59.51] (helo=macbook2.local) by elasmtp-scoter.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from ) id 1RdoGb-0002vu-Ie for gdb-patches@sourceware.org; Thu, 22 Dec 2011 14:25:25 -0500 Message-ID: <4EF3841C.2050603@earthlink.net> Date: Thu, 22 Dec 2011 19:40:00 -0000 From: Stan Shebs User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH] PIE support for OpenBSD References: <201112172108.pBHL8Th2032226@glazunov.sibelius.xs4all.nl> <20111221171315.GA18194@host2.jankratochvil.net> <201112212126.pBLLQ2Fl013069@glazunov.sibelius.xs4all.nl> <4EF26E18.3030401@earthlink.net> <201112221020.pBMAKaL0007007@glazunov.sibelius.xs4all.nl> In-Reply-To: <201112221020.pBMAKaL0007007@glazunov.sibelius.xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ELNK-Trace: ae6f8838ff913eba0cc1426638a40ef67e972de0d01da940a232befa0ac3e445b8a20b54ca9cdb73350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-IsSubscribed: yes 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 X-SW-Source: 2011-12/txt/msg00791.txt.bz2 On 12/22/11 2:20 AM, Mark Kettenis wrote: >> Date: Wed, 21 Dec 2011 15:39:04 -0800 >> From: Stan Shebs >> >> On 12/21/11 1:26 PM, Mark Kettenis wrote: >>>> Date: Wed, 21 Dec 2011 18:13:15 +0100 >>>> From: Jan Kratochvil >>>> >>>> On Sat, 17 Dec 2011 22:08:29 +0100, Mark Kettenis wrote: >>>>> For now this is OpenBSD-specific, but FreeBSD and NetBSD might >>>>> implement the PIOD_READ_AUXV request at some point too. >>>> [...] >>>>> * inf-ptrace.c [PT_IO&& PIOD_READ_AUXV] >>>> So why didn't you put it into *bsd*-nat.c files? >>> There is already PT_IO support code in inf-ptrace.c. It makes sense >>> to keep it all together. I guess I could move all that code into a >>> seperate bsd-nat.c file, but that's quite a big undertaking. And >>> inf-ptrace.c *BSD really is the primary user of inf-ptrace.c anyway. >>> The various Linux targets only need it to support ancient versions of >>> the Linux kernels; linux-nat.c ovverrides everything except for >>> to_fetch_registers and to_store_registers. And those are overridden >>> by most, if not all, *-linux-nat.c files. >>> >> I wonder if inf-ptrace.c could be retired altogether. It was always >> based on a weak assumption, that Unix variants would tend to have the >> same syntax and semantics for the various ptrace commands, and I suspect >> that more of its code is unreachable than is obvious from inspection, >> what with configs overriding or on the verge of being retired themselves. > Almost all of the code is used on OpenBSD and the other BSDs. It is > certainly true that systems have diverged. This is especially true > for Linux where we have a lot of support code for dealing with threads > that sits on top of the code in inf-ptrace.c. It still uses a fair > chunk of the code through linux_ops->to_create_inferior, to_attach, > to_detach and to_stop, to_resume and to_mourn_inferior, as pointed out > by Jan. But I currently do see inf-ptrace.c primarily as BSD support > code and further decoupling the Linux code might make some sense. But > you'd need to duplicate a fair amount of code to fully decouple > to_create_inferior for example. > > Back to my origional diff. Any remaining objections to committing it as is? > Looks fine to me. It would be helpful to mention somewhere in the vicinity of the #if's that the code is BSD-specific or BSDish, so as to forestall people hunting around in other OS headers wondering if those macros are defined or not. Stan