Re: '\r' only end-of-line

Eli Zaretskii
2006-10-11T17:47:14Z

> Date: Wed, 11 Oct 2006 09:32:54 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sourceware.org
>
> As a general position, are we willing to support things written /
> compiled on other hosts? This includes both line endings and
> pathnames. I hope the answer is yes, but I don't know.

Well, _my_ answer is a firm YES, and whoever volunteers to make that
happen will get all the support I can provide in my admittedly limited
time.

> debugger got very, very unhappy because there's a filename comparison
> in the dwarf reader; one of the arguments came from the compiler as
> "\foo\bar.h" and the other came in two pieces "\foo" and "bar.h". GDB
> assembled that as "\foo/bar.h" and FILENAME_CMP returned false.

IMHO, it's fundamentally wrong to compare file names as strings;
FILENAME_CMP is just a band-aid that I introduced as a stop-gap. We
could (and probably should) do better, especially if situations like
above happen.

Alternatively, we could force GDB to canonicalize all slashes in its
symbol tables, and then FILENAME_CMP will work just fine. But this is
less reliable, especially in the face of file names that come from
outside GDB, like from the command line etc.

> Would a gdb_filename_cmp with this behavior be OK?

I'd support that, but we need to talk a bit about what it should do,
as there are a few complications.