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


> Date: Mon, 30 Jan 2006 16:38:26 -0800
> From: Eirik Fuller <eirik@hackrat.com>
> 
> > 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


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