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 21:45:00 -0000	[thread overview]
Message-ID: <20090922214540.GA14014@caradoc.them.org> (raw)
In-Reply-To: <20090922212042.GE8910@adacore.com>

On Tue, Sep 22, 2009 at 02:20:42PM -0700, Joel Brobecker wrote:
> Hi Daniel,
> 
> > Any thoughts on this patch?  May I include it in 7.0?
> 
> My only thought was that last_source_visited is really only useful
> to print_source_lines_base, and it's used as a mechanism to prevent
> a warning from being printed every time we try to print source lines
> for the same file.  So I thought it might be cleaner if that global
> was made static to print_source_lines_base.  However, this wouldn't
> work as is, as it turns out this is also used as a cache for source
> file lookup! I'm guessing this is only a side-effect of the original
> intent.
> 
> I believe it would be cleaner to adjust the use of that variable
> so as to make it static to print_source_lines_base, but this can
> be addressed independently of your patch is someone is interested.
> In the meantime, I think your patch is progress, and it seems fine
> to put it in 7.0 as well.

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?

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2009-09-22 21:45 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 [this message]
2009-09-22 22:03     ` Joel Brobecker
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=20090922214540.GA14014@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