From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28080 invoked by alias); 31 Jan 2006 05:34:42 -0000 Received: (qmail 28070 invoked by uid 22791); 31 Jan 2006 05:34:42 -0000 X-Spam-Check-By: sourceware.org Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.205) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 31 Jan 2006 05:34:40 +0000 Received: by zproxy.gmail.com with SMTP id x3so1264307nzd for ; Mon, 30 Jan 2006 21:34:38 -0800 (PST) Received: by 10.37.2.70 with SMTP id e70mr5633688nzi; Mon, 30 Jan 2006 21:34:38 -0800 (PST) Received: by 10.37.2.63 with HTTP; Mon, 30 Jan 2006 21:34:38 -0800 (PST) Message-ID: <8f2776cb0601302134w35cf9ae2v3cf03a4113fb3018@mail.gmail.com> Date: Tue, 31 Jan 2006 05:34:00 -0000 From: Jim Blandy To: Eirik Fuller Subject: Re: [PATCH] Use mmap for symbol tables Cc: David Anderson , gdb-patches@sourceware.org In-Reply-To: <43DEEEF2.7030202@hackrat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200601310437.k0V4bcJ7208753@quasar.engr.sgi.com> <43DEEEF2.7030202@hackrat.com> 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/msg00486.txt.bz2 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.=20 You'd get an interface that works with all files, but performs better when the linker does its job right.