From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7385 invoked by alias); 31 Jan 2006 14:00:19 -0000 Received: (qmail 7376 invoked by uid 22791); 31 Jan 2006 14:00:18 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 31 Jan 2006 14:00:17 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F3w3J-0000Lo-SK; Tue, 31 Jan 2006 09:00:13 -0500 Date: Tue, 31 Jan 2006 14:00:00 -0000 From: Daniel Jacobowitz To: Jim Blandy Cc: Eirik Fuller , David Anderson , gdb-patches@sourceware.org Subject: Re: [PATCH] Use mmap for symbol tables Message-ID: <20060131140013.GB1249@nevyn.them.org> Mail-Followup-To: Jim Blandy , Eirik Fuller , David Anderson , gdb-patches@sourceware.org References: <200601310437.k0V4bcJ7208753@quasar.engr.sgi.com> <43DEEEF2.7030202@hackrat.com> <8f2776cb0601302134w35cf9ae2v3cf03a4113fb3018@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f2776cb0601302134w35cf9ae2v3cf03a4113fb3018@mail.gmail.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes 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/msg00490.txt.bz2 On Mon, Jan 30, 2006 at 09:34:38PM -0800, Jim Blandy wrote: > On 1/30/06, Eirik Fuller wrote: > > This suggests a simple way to complicate my mmap patch. If it can be > > determined beforehand what interval of the symbol table gdb is going to > > read in its entirety, that interval can be recorded in the BFD struct, > > and the first mmap call can map just that interval. That will > > complicate the offset calculations somewhat, but the basic approach will > > be the same. This will only waste virtual address space if the sections > > gdb would otherwise read don't form a contiguous region of the file. > > Actually, that's a pretty great idea. We could have the linker > arrange to put all the debug sections together; that's easy. Then we > could have the BFD API let GDB specify a list of sections to map. BFD > would map the smallest contiguous region containing those sections. > You'd get an interface that works with all files, but performs better > when the linker does its job right. ... why? You're jumping through hoops here to avoid mmaping each individual section, but I don't understand what's wrong with that. -- Daniel Jacobowitz CodeSourcery