From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21332 invoked by alias); 31 Jan 2006 21:48:39 -0000 Received: (qmail 21324 invoked by uid 22791); 31 Jan 2006 21:48:38 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 31 Jan 2006 21:48:36 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k0VLltQZ023023; Tue, 31 Jan 2006 22:47:56 +0100 (CET) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id k0VLlt6P029401; Tue, 31 Jan 2006 22:47:55 +0100 (CET) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id k0VLlrxj011443; Tue, 31 Jan 2006 22:47:53 +0100 (CET) Date: Tue, 31 Jan 2006 21:48:00 -0000 Message-Id: <200601312147.k0VLlrxj011443@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: eirik@hackrat.com CC: jimb@red-bean.com, gdb-patches@sourceware.org In-reply-to: <43DEB182.4020804@hackrat.com> (message from Eirik Fuller on Mon, 30 Jan 2006 16:38:26 -0800) Subject: Re: [PATCH] Use mmap for symbol tables References: <20060129233630.3EFA6690067@ns.hackrat.org> <8f2776cb0601292104y1c29f4adl6e681b20cd86c177@mail.gmail.com> <43DDFC13.90909@hackrat.com> <8f2776cb0601301007k5bccb594he33b08e84096d1a2@mail.gmail.com> <43DE61FD.2090309@hackrat.com> <8f2776cb0601301411j17219c9en74881de2489ad129@mail.gmail.com> <43DEB182.4020804@hackrat.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00494.txt.bz2 > Date: Mon, 30 Jan 2006 16:38:26 -0800 > From: Eirik Fuller > > > For inclusion in the public GDB sources, I'd want GDB's sensitivity to > > the files being changed out from underneath it to be unaffected, > > regardless of the details of peoples' build processes. > > Fair enough. Making the mmap patch a configure time option (not just > detecting the presence of mmap, but requiring that use of mmap to be > explictly enabled) would accomplish that. Or always compile it in if > mmap is detected at configure time but leave it disabled by default. > If it's available, but is enabled only by request, and if the associated > risks are documented, I don't think GDB's ability to handle changed > files is diminished in any meaningful sense. Please be aware that even if a particular OS supports mmap(2), it may not be able to mmap files on all filesystems. So you'll have to check at runtime whether mmap is possible and if it fails fall back on the old code that simply reads the file. Mark