From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 4SX3IGmY6mmGcTcAWB0awg (envelope-from ) for ; Thu, 23 Apr 2026 18:08:41 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ZDAoPOW1; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 80CD51E0BA; Thu, 23 Apr 2026 18:08:41 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 0802C1E093 for ; Thu, 23 Apr 2026 18:08:41 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id C08F84B99F56 for ; Thu, 23 Apr 2026 22:08:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C08F84B99F56 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ZDAoPOW1 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 7ABEB4BAD150 for ; Thu, 23 Apr 2026 22:08:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7ABEB4BAD150 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7ABEB4BAD150 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776982094; cv=none; b=CGt/KF0Sdrq8W6Ep3Jozal+shXHEwX1fsfBWagZnoGBMXSnt2y66B0ByIm/3SawCLdwp5Y6yre0BBnnAzCywi5eNVqdyxiXNNUzMDaI9I9GwrQuROeSnMcGXwgMfcBAkcBebToEM3sVE41JdTw7v5Mt7RKhXbPxwgeeRO4yfAoE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776982094; c=relaxed/simple; bh=2V3MnMtCmBV1AY47xsymgwq5XdYBVps9EyyRYyOT6xU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=KNC92bOQTCrURi1YiSqT9FfvN3vcO9TAr7AjbnfWrYY7OZHKzgbkTe5hYzoa8Q51Cv59osWofpGF0DPHu0dYC68+UnaUyrwS7TKC6DJQL8EvTn3IHyyU+u+/EIhm7VIYyScX35Fu1Vyua6oQjHIGUr+BHIfdrN0MygWD2LbqwCc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7ABEB4BAD150 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776982094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bT06LNPt5fCmNpQfF6/y49y5rtr7HI6En1v2OqcXyIg=; b=ZDAoPOW13YhwB78SYc/G/p/LEqVe3+plNerJ8kOfuPBrEtyTkOaW/RTfvs+Uyc+2mN7Wvr koPAnUNBNbDa6OIYwYx1tmFW5oX/hEPLjIwYduFZ10CjLe7zisa5UvqARbSY7TyjfH8q/m aBbeNoDSh6Tc2qqPmzSxZQg4APKtp8c= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-367-C858oj7QMM-BecZW8u9pAA-1; Thu, 23 Apr 2026 18:08:12 -0400 X-MC-Unique: C858oj7QMM-BecZW8u9pAA-1 X-Mimecast-MFC-AGG-ID: C858oj7QMM-BecZW8u9pAA_1776982092 Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-50fb6d713ddso64139871cf.1 for ; Thu, 23 Apr 2026 15:08:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776982092; x=1777586892; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bT06LNPt5fCmNpQfF6/y49y5rtr7HI6En1v2OqcXyIg=; b=jk8qcZDnS+HTBqXkYLm8W++0Wj43nu6qHlzfxzTNDV5cwYBuL1vebcucOdzbKZr+Ws OUjgKsO/chJzl8w5H7zNqXElwRxtp43D3p+x3xb4srC536RZE3ZhDtHm4jDQqSk1LqXs IbWw9UZKHb0IMouA8lNgrbRZ5cHu8uzk2bceuH1kWnx0NBszuAKbShy5YoOkDOabiqjo Ar9G9nlQoiq/e7tIhetcpGsvKpu8YSTUSAhODrHma6/u1AE3rWcIJ7JlLP26/w8KTcaL cQzoUUNk36A/Ia+sc1XbchY1XUj0zcvjNGLJmavr0yJOUJteWOR+/fkLBrW6nVLleHfZ 5vkA== X-Forwarded-Encrypted: i=1; AFNElJ8AFAoU7SMiCT88P/H/y5h7CO4ULxY7mGHbDmo5tO6qLOXsrXKdgUSWqhyZR9uqgmcqso6EpfjhiR/slA==@sourceware.org X-Gm-Message-State: AOJu0Ywc+9IlQX5A9l4jFIljS5BSrPXlZ23QJsbgqDypUv+lDXAfYBf+ TYvQNpuVdAQlDu9oGmjYOIpKhCN6gK7FfWvlrfWrUCRhIL3xJ790fouUAFiIAw1GKqvtjjVId9V WzkAwUvBhnvcdb5SOMpSXMgLfoRlcRRgPs12M6Rp76HSPxntc3LCyJOJA6eyuCAI= X-Gm-Gg: AeBDiesYXen+9jdMll4bSO9BLkIUTzh7LYyZfnx7qDrmnACTTIthE/sHBGyFYZ1wctI eV6ylNb4GAQs+au194PZ614hYbWFFLnjmUK1jMUrBKLP2nVvK3J2hsrcoxDs+VTZJwtWXSCICX4 7V4iazJRlimjS1yi9WNwaQyhGLC471BgPc5mn+1qeaLS9c71VC7IAdslNzgVYAa8U/e9BHLi64D VoNeRUTGSsWFvAP6xWIZDJSLSqEVqQ5CeX2LatDtmxIVvFbTrBPX0dAH15A/pNOdQwMZ7egkHX2 y1EfbyGozNO/uXbBofAZifcsbLdyIhuhaONV4zmSmwzecUD2/UA1rlLmst0LHlnT4dWmlZjQVGf SLbeWy3epdRCdvt1zch/f/A1p1l4apSc1TPzODF8= X-Received: by 2002:a05:622a:1884:b0:50d:a644:69b1 with SMTP id d75a77b69052e-50e36ba3f1fmr403203361cf.25.1776982092119; Thu, 23 Apr 2026 15:08:12 -0700 (PDT) X-Received: by 2002:a05:622a:1884:b0:50d:a644:69b1 with SMTP id d75a77b69052e-50e36ba3f1fmr403202771cf.25.1776982091627; Thu, 23 Apr 2026 15:08:11 -0700 (PDT) Received: from [150.1.200.157] ([172.56.107.181]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-50fc42c7fabsm49814071cf.9.2026.04.23.15.08.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Apr 2026 15:08:11 -0700 (PDT) Message-ID: <4ff57d97-02a3-4e10-b6f7-7203372ebda4@redhat.com> Date: Thu, 23 Apr 2026 15:08:09 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 5/5] gdb/linux: handle missing NT_FILE note when opening core files To: Andrew Burgess , gdb-patches@sourceware.org References: <84829f29d55cd681c1829c60109c9eb140353795.1773498341.git.aburgess@redhat.com> From: Keith Seitz In-Reply-To: <84829f29d55cd681c1829c60109c9eb140353795.1773498341.git.aburgess@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: X6e0wxTeZkmE6uGny5VnZTBxl8194mtlkCtSxmbw-K8_1776982092 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 3/14/26 7:32 AM, Andrew Burgess wrote: > Then in corelow.c various functions are updated in order to handle > anonymous mappings. Just one note below, otherwise LGTM. > diff --git a/gdb/corelow.c b/gdb/corelow.c > index d63dd5f8f0d..d1412c4903a 100644 > --- a/gdb/corelow.c > +++ b/gdb/corelow.c > @@ -1963,7 +1972,6 @@ mapped_file_info::add (const char *soname, > const bfd_build_id *build_id) > { > gdb_assert (build_id != nullptr); > - gdb_assert (expected_filename != nullptr); > > if (soname != nullptr) > { The comment at the beginning of this method (mapped_file_info::add) contains: EXPECTED_FILENAME is the name of the file that was mapped into the inferior as extracted from the core file, this should never be nullptr. This needs to be updated, since null `expected_filename' file names will now be ignored. Keith > @@ -1983,13 +1991,17 @@ mapped_file_info::add (const char *soname, > m_soname_to_build_id_map[soname] = build_id; > } > > - /* When the core file is initially opened and the mapped files are > - parsed, we group the build-id information based on the file name. As > - a consequence, we should see each EXPECTED_FILENAME value exactly > - once. This means that each insertion should always succeed. */ > - const auto inserted > - = m_filename_to_build_id_map.emplace (expected_filename, build_id).second; > - gdb_assert (inserted); > + /* Ignore empty filenames. */ > + if (expected_filename != nullptr) > + { > + /* When the core file is initially opened and the mapped files are > + parsed, we group the build-id information based on the file name. As > + a consequence, we should see each EXPECTED_FILENAME value exactly > + once. This means that each insertion should always succeed. */ > + const auto inserted > + = m_filename_to_build_id_map.emplace (expected_filename, build_id).second; > + gdb_assert (inserted); > + } > > /* Setup the reverse build-id to file name map. */ > if (actual_filename != nullptr)