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 5C0313846078 for ; Mon, 31 Aug 2020 14:50:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5C0313846078 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=alves.ped@gmail.com Received: by mail-wm1-f49.google.com with SMTP id b79so5554781wmb.4 for ; Mon, 31 Aug 2020 07:50:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=dApRQ+skAbwggn0kgHTXK852Ym0sJ39l26V5TIflGRw=; b=tEKKkt+aZhwNfcpptFFtlm6Q5ZwDZQxZJQ5SobprrRz5z3vewhQ0NWXMYfY53qU6f7 AhAhsRJaeDmBSolzNeD53flXuofVtul3yPURAmBXO/ehcCv4KCAk8sxxUfKszv8jgVRT qnElKeYog4A7sxLzknIo2Xjfst0ukYk+EuEC2m8VwPH4rUsmI+TsNv+kmMUsJ3r47clB SZK6cbbKEFyzUIXZxdFAgfuCBMeePlOKrXKpW1t36yXS5rE0f1zEdRjIp6zK2E7c6ILF E1V3ucZGaO0MX/8kjvhZdaajgQMD0yFt5zdnQNXU3QhCcyJE0I/wB8oE/29PT075BnEv yQJA== X-Gm-Message-State: AOAM5335JPMFyV2n5YpezLN4iDRTbJk2zKcUxQH0DH2tXXlltQke3Dh8 3zWFVjlZiH70Gi+3QjsmMWa+eV0ggDmRxQ== X-Google-Smtp-Source: ABdhPJyyb3SH7yMeQp58ALOpjzOJs6mIKjFHHWkqZFsDBLxxv616TU3obUpWphSiGdyhsAxYadf28Q== X-Received: by 2002:a05:600c:2790:: with SMTP id l16mr1812569wma.180.1598885409567; Mon, 31 Aug 2020 07:50:09 -0700 (PDT) Received: from ?IPv6:2001:8a0:f905:5600:56ee:75ff:fe8d:232b? ([2001:8a0:f905:5600:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id s17sm4167447wrr.40.2020.08.31.07.50.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Aug 2020 07:50:08 -0700 (PDT) Subject: Re: [PATCH] Work around incorrect/broken pathnames in NT_FILE note To: Kevin Buettner , gdb-patches@sourceware.org References: <20200807222044.2252664-1-kevinb@redhat.com> <0430a5a8-e5b5-d63e-047c-0d25fb5767ac@palves.net> <20200828202528.36adfec0@f32-m1.lan> From: Pedro Alves Message-ID: <0484421f-a3a6-a319-760f-a620c86385bb@palves.net> Date: Mon, 31 Aug 2020 15:50:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20200828202528.36adfec0@f32-m1.lan> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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, 31 Aug 2020 14:50:12 -0000 Hi Kevin, On 8/29/20 4:25 AM, Kevin Buettner wrote: > Hi Pedro, > > I've made all of the changes you suggested except for this one... > >>> @@ -227,6 +244,7 @@ core_target::build_file_mappings () >>> >>> if (bfd == nullptr || !bfd_check_format (bfd, bfd_object)) >>> { >>> + m_core_unavailable_mappings.emplace_back (start, end - start); >>> /* If we get here, there's a good chance that it's due to >>> an internal error. We issue a warning instead of an >>> internal error because of the possibility that the >> >> Now that we're expecting to reach here, the comment about an internal >> error seems stale. > > IMO, we'll (still) only reach the code in question due either to an > internal error or due to the condition mentioned later in the comment. > Bear in mind that we've already checked for the existence of the file > and have even opened the file (though we're discarding the result) in > the call to exec_file_find(). The test with accompanying warning message > following the call to exec_file_find() should handle most if not all cases > where the path name is bad / broken. > > The calls to bfd_openr() and bfd_check_format() _should_ be successful, > but we still need to check the result, hence second block containing the > comment and the warning, etc. > I see, thanks. This version LGTM. Pedro Alves