This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: PR 2014, 2007, 1968, 1945, 1935, 1865, 1823
On Wed, Oct 26, 2005 at 10:01:24PM -0400, Daniel Jacobowitz wrote:
> Oh, while you're in the area: ISTR finding that BFD was missing
> O_LARGEFILE somewhere that GDB had it. So if GDB opened the core file,
> and then BFD closed and reopened it, the open would fail.
Yes, there was a silly check in bfd_cache_lookup_worker that tested for
abfd->where being in unsigned long range. That's gone, but I guess
there might be other places similarly broken.
I'm also working on the following tweaks to bfd_cache_lookup.
/* In some cases we can optimize cache operation when reopening files.
For instance, a flush is entirely unnecessary if the file is already
closed, so a flush would use CACHE_NO_OPEN. Similarly, a seek using
SEEK_SET or SEEK_END need not first seek to the current position.
For stat we ignore seek errors, because stat might be used (eg. by
gdb) to determine whether a file has changed while we weren't
looking. If it has, then it's possible that the new file is shorter
and we don't want a seek error to prevent us doing the stat. */
enum cache_flag {
CACHE_NORMAL = 0,
CACHE_NO_OPEN = 1,
CACHE_NO_SEEK = 2,
CACHE_NO_SEEK_ERROR = 4
};
--
Alan Modra
IBM OzLabs - Linux Technology Centre
- References:
- PR 2014, 2007, 1968, 1945, 1935, 1865, 1823
- Re: PR 2014, 2007, 1968, 1945, 1935, 1865, 1823