This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: gnulib stat problem
- From: Tom Tromey <tom at tromey dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: Christian Biesinger <cbiesinger at google dot com>, Simon Marchi <simon dot marchi at polymtl dot ca>, gdb-patches at sourceware dot org, palves at redhat dot com
- Date: Tue, 14 Jan 2020 11:16:47 -0700
- Subject: Re: gnulib stat problem
- References: <gerrit.1573970717000.I9c2b07a3046baecfb664e21b2644353ea888dbfa@gnutoolchain-gerrit.osci.io> <20191216182208.22D882816F@gnutoolchain-gerrit.osci.io> <87imle7z8x.fsf_-_@tromey.com>
Tom> Maybe gdb could *only* use bfd_get_mtime when it matters. This would
Tom> mean changing gdb_bfd_open to create a BFD before checking the cache,
Tom> but maybe that's not very expensive.
I implemented this. This approach seems pretty nice.
Also, I discovered that bfd_stat exists, which means we could also put
target BFDs into the cache -- currently we only put local ones there.
So, this seems like another plus (though I haven't implemented this
caching yet), and provides an additional reason to go this route.
Tom