[PATCH] Use mmap for symbol tables

Daniel Jacobowitz drow@false.org
Tue Jan 31 14:00:00 GMT 2006


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.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list