Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] Fix source path lookup immediately after substitute-path
Date: Tue, 22 Sep 2009 22:12:00 -0000	[thread overview]
Message-ID: <20090922221233.GA16036@caradoc.them.org> (raw)
In-Reply-To: <20090922220302.GF8910@adacore.com>

On Tue, Sep 22, 2009 at 03:03:02PM -0700, Joel Brobecker wrote:
> 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) :).

Yes, thank you :-)

> > 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.

Oh, I understand now.  In the specific case of a failed lookup, it's
used as a cache.  It's never used to cache a successful lookup - if
!last_source_error, we'll always call openp again.

I agree that this is not particularly important either way.  Thanks
for explaining!

-- 
Daniel Jacobowitz
CodeSourcery


      reply	other threads:[~2009-09-22 22:12 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
2009-09-22 22:12       ` Daniel Jacobowitz [this message]

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=20090922221233.GA16036@caradoc.them.org \
    --to=drow@false.org \
    --cc=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