This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use mmap for symbol tables


On 1/31/06, Daniel Jacobowitz <drow@false.org> wrote:
> On Mon, Jan 30, 2006 at 09:34:38PM -0800, Jim Blandy wrote:
> > On 1/30/06, Eirik Fuller <eirik@hackrat.com> 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.

Sorry, "great idea" meant "clever way of satisfying the constraints
Eirik has set"; I suggested mapping individual sections at the front,
but Eirik said he wasn't interested in implementing that.  "Great
idea" didn't mean "this is the Way It Should Be Done."  I was caught
up in the moment.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]