From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by sourceware.org (Postfix) with ESMTPS id 157D33858D1E for ; Mon, 18 Apr 2022 17:59:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 157D33858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f49.google.com with SMTP id r19so3280499wmq.0 for ; Mon, 18 Apr 2022 10:59:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=gBT76wBsIORl+cB7xtfrH87UvrbfvzQb+r8/1+tFXsk=; b=e/ObfCyCG/H3s1t30igs9lsQDxB5Ij6qDnThlfAF29Njh///C8Pe1wolcjCJn/NSbN GY2Sn34VambP2Pv+slKxcYhmONVMsRB2LcdH457aBYKG26YcC9pQC/WuIq1faYPP1Zvu fhps7j756iqcfL4H+vWoA0aLTx7s1TtgZjoE3/cw+ThnCVuzemn/acE4Ux0PafqrcwYQ 5GDtVkZnjxrFGAnaYlMYwrBuxl8GF4bOgSwY78qRn7MRTeDwKajpGEzbuHS8Vs2GV8vs a77iHzXgEI2dM1e3gQluHd0DEcGv/8AEQRNTr+jg//TprtYNvhT57osATTCeZalTCVPA gLTg== X-Gm-Message-State: AOAM530FqEjb3DSTEg1KoaY9La5p6VOArkAAY/+OnOVzZiLvnuPoiYAD 2jDI/nT2Q7ouATl3tI6WvFI= X-Google-Smtp-Source: ABdhPJzOtwTK981Ff4HjQjbyzB2meZU6BX2dm6l6hSMw+hoq1pMNvi/fKy+SO51RsTY4JzAaiLFUSg== X-Received: by 2002:a05:600c:1e1e:b0:38e:baaa:aae0 with SMTP id ay30-20020a05600c1e1e00b0038ebaaaaae0mr11908420wmb.157.1650304769923; Mon, 18 Apr 2022 10:59:29 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id m65-20020a1ca344000000b0038ec75d90a8sm13907203wme.2.2022.04.18.10.59.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Apr 2022 10:59:28 -0700 (PDT) Message-ID: Date: Mon, 18 Apr 2022 18:59:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH 5/6] gdb: prepend comp_dir to symtab name in buildsym_compunit Content-Language: en-US To: Simon Marchi , Tom Tromey , Eli Zaretskii via Gdb-patches References: <20220407015159.1734834-1-simon.marchi@polymtl.ca> <20220407015159.1734834-6-simon.marchi@polymtl.ca> <835ynlctmb.fsf@gnu.org> <37276133-bfc5-43df-dea7-9e8188a8e5a9@polymtl.ca> <83lewgbzam.fsf@gnu.org> <87sfqauz6b.fsf@tromey.com> From: Pedro Alves In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2022 17:59:32 -0000 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 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." Mach here probably refers to the Mach microkernel used in the Gnu Hurd. I have no idea whether any of this is still relevant.