Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: tromey@redhat.com, gdb-patches@sourceware.org
Subject: Re: [patch 4/9] TUI: Use internally fullname
Date: Tue, 22 Jan 2013 06:55:00 -0000	[thread overview]
Message-ID: <83mww1ogfl.fsf@gnu.org> (raw)
In-Reply-To: <20130121211121.GA29177@host2.jankratochvil.net>

> Date: Mon, 21 Jan 2013 22:11:21 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: gdb-patches@sourceware.org
> 
> -      if (compare_filenames_for_search (s->filename, name))
> +      if (compare_filenames_for_search (s->filename, name)
> +         || compare_filenames_for_search (symtab_to_fullname (s), name))
> 
> One cannot use just:
> +      if (compare_filenames_for_search (symtab_to_fullname (s), name))
> 
> as in the case of S->FILENAME == NAME == "./gdb.base/return.c" it would be
> a regression because SYMTAB_TO_FULLNAME == "/gdb/testsuite/gdb.base/return.c".
> Formerly S->FILENAME matched NAME but SYMTAB_TO_FULLNAME does not match NAME.
> 
> One could also do some "normalization" of NAME, one could strip "./" but for
> more complicated cases one cannot do much.

Why strip it?  We could resolve "." to an absolute file name using the
compilation directory, and then they will match, right?

> The next step would be to turn various pathname comparisons rather to
> st_dev&&st_ino comparisons when possible which should be both faster and more
> universal.

That will break on Windows, unless we replace the library
implementation of 'stat' and 'fstat', or provide a method for
retrieving just the inode and device number (which could be
implemented on Windows using available APIs, such as
GetFileInformationByHandle).


  reply	other threads:[~2013-01-22  6:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-17 21:59 Jan Kratochvil
2013-01-21 18:57 ` Tom Tromey
2013-01-21 21:11   ` Jan Kratochvil
2013-01-22  6:55     ` Eli Zaretskii [this message]
2013-01-22  7:12       ` Jan Kratochvil
2013-01-22  8:24         ` Eli Zaretskii
2013-01-22  8:47           ` Jan Kratochvil
2013-01-22 11:44             ` Eli Zaretskii
2013-01-22 12:05               ` Jan Kratochvil
2013-01-22 13:23                 ` Eli Zaretskii

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=83mww1ogfl.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=tromey@redhat.com \
    /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