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: Danny Backx <danny.backx@scarlet.be>,
		gdb-patches <gdb-patches@sourceware.org>
Subject: Re: shared lib dos filename style - one more question
Date: Mon, 12 Oct 2009 20:45:00 -0000	[thread overview]
Message-ID: <20091012204451.GA17607@caradoc.them.org> (raw)
In-Reply-To: <20091010021849.GC5272@adacore.com>

On Fri, Oct 09, 2009 at 07:18:49PM -0700, Joel Brobecker wrote:
> My thoughts on that are similar to Daniel's: I don't think that we'll
> see many files on UNIX systems that start with d: or d:\, nor will we
> see a lot of backslashes either. But you never know, people like to
> shoot themselves in the foot, I've noticed.
> 
> I would agree to changing GDB so that pathnames are treated as DOS
> pathnames, modulo the case-sensitivity issue. This means that d:/
> or d:\ is treated as a drive, and that forward and backward slashes
> are treated as directory separators. I don't think we want to start
> treating filenames as case-insensitive on Unix systems.
> 
> But I think that this should still remain under control of a setting
> that allows GDB to revert to using the host filesystem convention.
> That way, if we run into unexpected issues, we can tell a user how
> to get back to the previous behavior.
> 
> Another venue that I don't think we have explored, is to fix the problem
> locally in solib:solib_find. Have we considered enhancing it in a way
> that, if solib_find found nothing, then call it again, but with a
> Unix-ified path.  If the file happens to be the in solib search path,
> it should be able to locate and return it.

There's nothing straightforward that this latter approach could do for
case-sensitivity problems, though - is there?  I'd prefer not to
completely rule out handling this case.

I wonder if the best solution wouldn't be a tri-state setting,
defaulting to 'auto' - DOS style on DOS/Windows hosts, also
recognizing forward slashes; Unix style on Unix hosts, also
recognizing drive letters and backslashes.

I haven't thought entirely about the pain involved in supporting
wrong-case files.  Maybe this is just wrong-headed... if open failed,
we'd have to do a wrong-case search, and that could get seriously out
of hand.  So maybe this is nuts...

Anyway, I'd prefer a global solution rather than one local to
solib_find.  For instance, we've had trouble with FILENAME_CMP
depending on which host the program was *compiled* on.

That's right, compiled.  It doesn't always matter what the host or
target systems are.

-- 
Daniel Jacobowitz
CodeSourcery


  parent reply	other threads:[~2009-10-12 20:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-26 13:49 Danny Backx
2009-10-07 20:05 ` Danny Backx
2009-10-07 20:11   ` Daniel Jacobowitz
2009-10-08 16:01     ` Danny Backx
2009-10-09 17:36       ` Joel Brobecker
2009-10-09 18:58         ` Danny Backx
2009-10-10  2:19           ` Joel Brobecker
2009-10-12 20:05             ` Danny Backx
2009-10-12 20:28               ` Eli Zaretskii
2009-10-13  5:24                 ` Joel Brobecker
2009-10-13 10:57                   ` Pedro Alves
2009-10-13 15:30                     ` Joel Brobecker
2009-10-13 18:23                       ` Eli Zaretskii
2009-10-13 18:12                   ` Eli Zaretskii
2009-10-13 18:19                     ` Daniel Jacobowitz
2009-10-12 20:45             ` Daniel Jacobowitz [this message]
2009-10-13  5:21               ` Joel Brobecker
2009-10-13 15:51                 ` Daniel Jacobowitz
2009-10-14 20:18               ` Danny Backx
2009-10-17  4:16                 ` Joel Brobecker

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=20091012204451.GA17607@caradoc.them.org \
    --to=drow@false.org \
    --cc=brobecker@adacore.com \
    --cc=danny.backx@scarlet.be \
    --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