From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFC] Fix source path lookup immediately after substitute-path
Date: Tue, 22 Sep 2009 22:03:00 -0000 [thread overview]
Message-ID: <20090922220302.GF8910@adacore.com> (raw)
In-Reply-To: <20090922214540.GA14014@caradoc.them.org>
Before I answer your question, I just wanted to point out that I did
review the patch, and that it seemed good to me (progress, even) :).
> last_source_visited is the direct cause of the problem I've fixed with
> this patch. External circumstances, like "dir" or "cd" or "set
> substitute-path" have to be able to invalidate the cache, so it has to
> be accessible outside the function. Have I misunderstood?
The comments for last_source_visited are saying that this variable
is meant to help us avoid printing the file-does-not-exist error
message more than once if we repeateadly try to list that same file.
However, in practice, this variable is also used to cache the result
of the lookup. If we deem the caching action unnecessary, and limit
its use to exclusively preventing the error message from being printed
more than once, then this variable can be made static; it would be
easier to understand the purpose of this variable and follow its life
cycle. That being said, the "if" here is whether the caching is
sufficiently desirable that we want to use that variable for both
aspects.
Again, this can be discussed seperately from your patch.
--
Joel
next prev parent reply other threads:[~2009-09-22 22:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-22 19:06 Daniel Jacobowitz
2009-09-22 21:21 ` Joel Brobecker
2009-09-22 21:45 ` Daniel Jacobowitz
2009-09-22 22:03 ` Joel Brobecker [this message]
2009-09-22 22:12 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090922220302.GF8910@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox