From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ElA6CqCb91/6GAAAWB0awg (envelope-from ) for ; Thu, 07 Jan 2021 18:39:12 -0500 Received: by simark.ca (Postfix, from userid 112) id 14D251E965; Thu, 7 Jan 2021 18:39:12 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 7721C1E590 for ; Thu, 7 Jan 2021 18:39:11 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A9AC2386101C; Thu, 7 Jan 2021 23:39:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A9AC2386101C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1610062750; bh=PKDyS+e3gNeMTo8nLOJJ6KD6iv2NkpfKBgP5iECTTOQ=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=PaHiQe6vG+z1DRPD9WR6C0c/UZ80ZTbUvjj52k4IfXJ8lMQX51e9nOANUsPpU58+K uH2dnaX4osk22sBseQIIOC2ZR1dhFe2r7MMecLZxjEWvLaMA3O4P1u/JRz4g5pilUN eRs0Z21DvjtspLQ/i3/taFOnuBNDLExKfS636x9k= Received: from mail.sergiodj.net (mail.sergiodj.net [IPv6:2607:5300:60:3666::3]) by sourceware.org (Postfix) with ESMTPS id 979AD386101C for ; Thu, 7 Jan 2021 23:39:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 979AD386101C Received: from localhost (bras-base-toroon1016w-grc-31-76-64-52-221.dsl.bell.ca [76.64.52.221]) by mail.sergiodj.net (Postfix) with ESMTPSA id EAD65A04EF; Thu, 7 Jan 2021 18:39:06 -0500 (EST) To: Simon Marchi via Gdb-patches Subject: Re: [PATCH] gdb: check for empty strings in get_standard_cache_dir/get_standard_config_dir References: <20210107205725.2010353-1-simon.marchi@efficios.com> <87pn2gv4wh.fsf@tromey.com> <69b9d1e9-ec9c-5bdc-4255-4f59440c0b5f@efficios.com> <21cd6bb7-f220-37c6-eef8-ede223a761ae@lancelotsix.com> <16b61c65-e8d0-d744-85f0-ca3d79439ca4@efficios.com> X-URL: http://blog.sergiodj.net Date: Thu, 07 Jan 2021 18:39:06 -0500 In-Reply-To: <16b61c65-e8d0-d744-85f0-ca3d79439ca4@efficios.com> (Simon Marchi via Gdb-patches's message of "Thu, 7 Jan 2021 16:53:10 -0500") Message-ID: <87eeiwz59h.fsf@paluero> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: , From: Sergio Durigan Junior via Gdb-patches Reply-To: Sergio Durigan Junior Cc: Simon Marchi , Lancelot SIX , Tom Tromey , sourcewarebugz@kyber.fi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On Thursday, January 07 2021, Simon Marchi via Gdb-patches wrote: > Perhaps it's just a limitation of gdb_tilde_expand, and it should be > changed to use something else than glob(3) in order to support > non-existent paths. Just to keep things in perspective and try to shed some light into why things are the way they are: Back when gdb_tilde_expand was implemented, I tried to find an alternative to using glob. Until that point, GDB was using readline's tilde_expand, which does the job. Unfortunately, due to the reason that we needed to use gdb_tilde_expand on gdbserver as well (which doesn't link against readline), and that gnulib doesn't support wordexp(3), glob was the only viable alternative I found. Cheers, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible https://sergiodj.net/