public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Simon Marchi <simon.marchi@polymtl.ca>,
	Tom Tromey <tom@tromey.com>,
	Eli Zaretskii via Gdb-patches <gdb-patches@sourceware.org>,
	Samuel Thibault <samuel.thibault@gnu.org>
Subject: Re: [PATCH 5/6] gdb: prepend comp_dir to symtab name in buildsym_compunit
Date: Mon, 18 Apr 2022 19:25:08 +0100	[thread overview]
Message-ID: <3b76285c-262f-2f89-bdb5-0f267569cb37@palves.net> (raw)
In-Reply-To: <8e5a16e3-534f-9cff-2d6a-9f39d22ecf6d@polymtl.ca>

[Adding Samuel.]

Samuel, please see Hurd question below.

On 2022-04-18 19:19, Simon Marchi wrote:
> 
> 
> On 2022-04-18 13:59, Pedro Alves wrote:
>> On 2022-04-18 18:36, Simon Marchi via Gdb-patches wrote:
>>>
>>>
>>> On 2022-04-18 12:35, Tom Tromey wrote:
>>>>>>>>> "Eli" == Eli Zaretskii via Gdb-patches <gdb-patches@sourceware.org> writes:
>>>>
>>>>>> It might not look pretty, but it should still yield a valid path.
>>>>
>>>> Eli> Well, at least on MS-Windows, "/foo/bar" and "//foo/bar" are very
>>>> Eli> different things.
>>>>
>>>> Technically, in POSIX, a leading "//" may have an implementation-defined
>>>> meaning.  Or at least this was true "back in the day", I haven't exactly
>>>> kept up.  I'm not aware of any implementations that do anything special
>>>> here, but I think in the distant past there was one.
>>>>
>>>> Tom
>>>
>>> There's one mentionned here:
>>>
>>> https://gitlab.com/gnutools/binutils-gdb/-/blob/dc6c21dabfbd242616b9e6266b459eded2d0762b/gdb/cli/cli-cmds.c#L606=
>>>
>>> 	    /* We are dealing with leading repetitions of "/..", for
>>> 	       example "/../..", which is the Mach super-root.  */
>>> 	    p += 3;
>>>
>>> I have no idea what "Mach super-root", and Googling doesn't help.  I
>>> started to get in the rabbit hole of factoring out this code that
>>> removes .  and .. from paths, but gave up for now.  But I was
>>> considering getting rid of this behavior in factor of the behavior
>>> where /../.. simplifies to /.  I tested on macOS, that's how it works
>>> today.  Perhaps someone on Hurd can tell how it works there?
>>
>> The autoconf manual, mentions, here:
>>
>>   https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/html_node/File-System-Conventions.html
>>
>> "Posix lets implementations treat leading // specially, but requires leading /// and beyond to be equivalent to /. Most Unix variants
>> treat // like /. However, some treat // as a “super-root” that can provide access to files that are not otherwise 
>> reachable from /. The super-root tradition began with Apollo Domain/OS, which died out long ago, but unfortunately Cygwin has revived it."
> 
> Ok, that's a different "super-root" syntax then.  What's supported in
> cd_command (my link above) talks about repeated leading "/..".
> 
> I just tried "ls //foo" on Cygwin.  It gave "no such file or
> directory", but it took a while to return, so I guess it's just handling
> it as a UNC path, trying to look up computer "foo" on my network (as Eli
> told initially).
> 
>> Mach here probably refers to the Mach microkernel used in the Gnu Hurd.
> 
> Yeah, that's why I asked.  If somebody has a Hurd system handy.  If Hurd
> treats /../.. as /, then I would vote to get rid of that behavior in
> cd_command, since there would be no known-to-us platform where it works
> like that.
> 
> Simon
> 

  reply	other threads:[~2022-04-18 18:25 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07  1:51 [PATCH 0/6] Fix printing macros Simon Marchi
2022-04-07  1:51 ` [PATCH 1/6] gdb/testsuite/dwarf: remove two unused variables Simon Marchi
2022-04-07 13:51   ` Tom Tromey
2022-04-07  1:51 ` [PATCH 2/6] gdb/testsuite/dwarf: simplify line number program syntax Simon Marchi
2022-04-07 13:52   ` Tom Tromey
2022-04-07 17:10     ` Simon Marchi
2022-04-07  1:51 ` [PATCH 3/6] gdb/testsuite/dwarf: don't automatically add directory and file entry for DWARF 5 Simon Marchi
2022-04-18 16:28   ` Tom Tromey
2022-04-18 17:32     ` Simon Marchi
2022-04-18 19:28       ` Tom Tromey
2022-04-18 20:58         ` Simon Marchi
2022-04-07  1:51 ` [PATCH 4/6] gdb/testsuite: add "macros" option to gdb_compile Simon Marchi
2022-04-07 14:01   ` Tom Tromey
2022-04-07 17:22     ` Simon Marchi
2022-04-07 18:31       ` Tom Tromey
2022-04-07 18:41         ` Simon Marchi
2022-04-07  1:51 ` [PATCH 5/6] gdb: prepend comp_dir to symtab name in buildsym_compunit Simon Marchi
2022-04-07  6:09   ` Eli Zaretskii
2022-04-07 16:44     ` Simon Marchi
2022-04-07 17:04       ` Eli Zaretskii
2022-04-07 17:26         ` Simon Marchi
2022-04-07 19:15           ` Eli Zaretskii
2022-04-07 19:45             ` Simon Marchi
2022-04-08  4:07               ` Eli Zaretskii
2022-04-08 13:54                 ` Simon Marchi
2022-04-09  6:59                   ` Eli Zaretskii
2022-04-18 16:35         ` Tom Tromey
2022-04-18 17:36           ` Simon Marchi
2022-04-18 17:59             ` Pedro Alves
2022-04-18 18:19               ` Simon Marchi
2022-04-18 18:25                 ` Pedro Alves [this message]
2022-04-18 20:33                   ` Samuel Thibault
2022-04-18 20:56                     ` Simon Marchi
2022-04-07 15:19   ` Hannes Domani
2022-04-07 18:01     ` Simon Marchi
2022-04-21 10:56       ` Hannes Domani
2022-04-21 20:26         ` Simon Marchi
2022-04-18 16:36   ` Tom Tromey
2022-04-18 20:18     ` Simon Marchi
2022-04-07  1:51 ` [PATCH 6/6] gdb/testsuite: add macros test for source files compiled in various ways Simon Marchi
2022-04-18 16:53   ` Tom Tromey
2022-04-21 18:36     ` Simon Marchi
2022-04-21 18:45       ` Pedro Alves
2022-04-21 18:47         ` Pedro Alves

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=3b76285c-262f-2f89-bdb5-0f267569cb37@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=samuel.thibault@gnu.org \
    --cc=simon.marchi@polymtl.ca \
    --cc=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).