From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MNCHIgvywl/JdwAAWB0awg (envelope-from ) for ; Sat, 28 Nov 2020 19:57:47 -0500 Received: by simark.ca (Postfix, from userid 112) id 8B4781F0AB; Sat, 28 Nov 2020 19:57:47 -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 2819E1E552 for ; Sat, 28 Nov 2020 19:57:47 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 222283857C45; Sun, 29 Nov 2020 00:57:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 222283857C45 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1606611466; bh=VausBEwrSRGu4nwfBcm0AqOBNGicND5ZGE8ADYhF4Cc=; 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=oqdPwEg4ggXdk4+TlcnrG99vT4utH5ep1A4rdNbJ9nF0PGHELidB79pIdnNEWRd5R jOTbZ7q3i6DfVzYwEtPTi+9OdQXsl1RfpaG5AWSqrWeHqRxcHBPIMriAPVfVI7P8FY PWSFg3hZPO5DPK5TkDHkTMakKATOoxVy3M+0gVgU= Received: from mail.sergiodj.net (mail.sergiodj.net [IPv6:2607:5300:60:3666::3]) by sourceware.org (Postfix) with ESMTPS id 1B354385802E for ; Sun, 29 Nov 2020 00:57:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1B354385802E Received: from localhost (bras-base-toroon1016w-grc-37-76-65-22-220.dsl.bell.ca [76.65.22.220]) by mail.sergiodj.net (Postfix) with ESMTPSA id B21B3A013C; Sat, 28 Nov 2020 19:57:43 -0500 (EST) To: Simon Marchi Subject: Re: [PATCH v2] Search for DWZ files in debug-file-directories as well References: <20201114234842.2334396-1-sergiodj@sergiodj.net> <20201119022708.3627287-1-sergiodj@sergiodj.net> <87zh31yza7.fsf@paluero> X-URL: http://blog.sergiodj.net Date: Sat, 28 Nov 2020 19:57:43 -0500 In-Reply-To: (Simon Marchi's message of "Sat, 28 Nov 2020 17:12:21 -0500") Message-ID: <87r1odyo6w.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: Mark Wielaard , gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On Saturday, November 28 2020, Simon Marchi wrote: > On 2020-11-28 3:58 p.m., Sergio Durigan Junior wrote: >>> And we probably don't need the allocated `ddir` std::string, you >>> construct it but never really use it (you could just refer to debugdir). >> >> I'll need it for the new version of the code, which will implement the >> idea I gave above (always guaranteeing that ddir ends with >> DIR_SEPARATOR). > > Ok, if you do that I think you can move ddir out of the loop, it doesn't > need to be re-computed for each loop iteration. ddir is just a temporary variable that will hold the current debug-file-directory + SLASH_STRING. I don't see how I could pre-compute it outside the loop, where I won't have access to the debug-file-directory. But maybe I'm missing something? -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible https://sergiodj.net/