From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id PRrsBTEv5mgN8iMAWB0awg (envelope-from ) for ; Wed, 08 Oct 2025 05:30:25 -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=bbaocBy6; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 07F861E0B6; Wed, 08 Oct 2025 05:30:25 -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 server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 47D0D1E047 for ; Wed, 08 Oct 2025 05:30:24 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B1CD73857710 for ; Wed, 8 Oct 2025 09:30:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B1CD73857710 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=bbaocBy6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id AE1713857710 for ; Wed, 8 Oct 2025 09:29:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AE1713857710 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 AE1713857710 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1759915786; cv=none; b=mTEQkUl6Fd6RcBWosLbTDR0K+yXDc2mnnC16B5NdSdJQJKwuXbA3yay7kqdUVw0hVtxPVNqhn7WsxPCygujpEiqnKpCKyHFKLQ4TQYGETQQreGlDeHjf0ewnCBD6H1eFhn+wWd9iHbcx/kmSqrxaa2K3c5Zpw7Izgd5x1+mYhwQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1759915786; c=relaxed/simple; bh=v+GI9/aAK4Om+ZqRRryQazvvhSHC43Et9iMQkUnpZYw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=bHw5GZdjvFtCe/xsKVGI63re0mEjeYiKJgIdRgWiO+nuG22z2lm9SWEUejaxyG0oxEfJP3hI/w21tjrX6x9AETmmIQI8n5cSB0d8jCR82FM2YEGGp3OFgCjiffTv3AsARct/QFYJLVaIQCYUkgZi6v3bOTNS94POPxavhW69Y4w= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AE1713857710 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1759915786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=buLL53YD8WlHN3vTpqi1EtQDr3eBSKjZPDqQiSoK5k4=; b=bbaocBy6Qtt88jKBBPtUe1WT2qlAwb13J63VAmdSrGhYdQeBZQhBPAHNldPwYrlxg3pUdQ b1UZbYBLVDT3P9cQtHMggIhvN0fXoyREexUNirgbhLdcsYJakGE1UlzLcjiVtIgILxuE5X T+V17g1xMns4ppFqd8D3zrO2RYS37JA= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-192-u6lU2evFNO-XhxQt9A0R_Q-1; Wed, 08 Oct 2025 05:29:44 -0400 X-MC-Unique: u6lU2evFNO-XhxQt9A0R_Q-1 X-Mimecast-MFC-AGG-ID: u6lU2evFNO-XhxQt9A0R_Q_1759915782 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-3f924ae2a89so5865229f8f.3 for ; Wed, 08 Oct 2025 02:29:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759915782; x=1760520582; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=buLL53YD8WlHN3vTpqi1EtQDr3eBSKjZPDqQiSoK5k4=; b=uJlk16dJuYRhZJImxNAJ2M1ao7x57vGP+Ngboewwa4C2yMqaiIo4xjmlEbmXtqJcms BrD+OylTzDt47r3f98tL6l9GlgtXrFG83zs2OQ2/i7VlVb9awcZ0dUGAur9GVdwiy0pG IxhEDCvH/6b0dQJNkthwkAxIb9rTbS39Ram/FS8ILqJizmTeR/LsF2X6EynEAUcmeREy 2+lnNKdUjNoqeSD36f6htIBKf6rhGWjj+NmL/Wk3tzMkgy7K6R9q7+qhdRzGn3MPYO/J HEvHhRNavaCcuGXOZtgLkVLTCa7NHVWF64Wf2jSIF6c4M3ARJNlTOCa02+DCq0B4H9RJ LeLQ== X-Gm-Message-State: AOJu0YwfU0Qj9styeTI/1jytyfWLinmONm7xLIaThNUt1khvD2vx7zhs LOXaFaS9HlyzSNFUWWHIaNhlTuxNumOa0uWk9ijYPw5YIiJRuwqTuSPH06NA3FIhT4C758OHuGz boBUZ9tGwEjad2fPfQ9Oa0dQKMpx9Oibx7AT8hLaAs3HLqF5EwqXtNmP2YnsiW3I= X-Gm-Gg: ASbGncsBF+LLL+6qXXfXXligvOrmTCnNmMeNpEWdMMFAb6rMtis0ylsHxzKU56W3aYo M+HSIKkCBsk/GL3qkJfhRGfF3F+tpHASTVWHcrHFzj67O6v6HkjFXx4bJ64O4u+72760vRrc8UO 8Rt4d6Et3hc7I0AAhDb8PyaucsKtxL/hIn9F1LVFCr8sET7I3OGKFZolIBMy9hps01O/VtlgQxR uCS+MWw0uMQG/mzCP/HmxxSxucKCuCTjKX9jeftfVVrlLm5K9qROJ/6ZzYdYAHJsYRgmUSe76oi TIArws/35g+79joNmG5VC+d1ENNu9P2LRh6601Jb X-Received: by 2002:a05:6000:18a9:b0:425:73c9:7159 with SMTP id ffacd0b85a97d-4266e8f7134mr1725436f8f.33.1759915782217; Wed, 08 Oct 2025 02:29:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH4pndiSi8MX81i4C8WXLrxGUb5ao7pLagmO+f32D0w1G7yhOSxRpbKku+KgogkOJUYaO10oQ== X-Received: by 2002:a05:6000:18a9:b0:425:73c9:7159 with SMTP id ffacd0b85a97d-4266e8f7134mr1725413f8f.33.1759915781808; Wed, 08 Oct 2025 02:29:41 -0700 (PDT) Received: from localhost ([31.111.84.207]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4255d8e9724sm28869564f8f.28.2025.10.08.02.29.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Oct 2025 02:29:41 -0700 (PDT) From: Andrew Burgess To: Tom de Vries , Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCHv2 3/3] gdb/python: add Corefile.mapped_files method In-Reply-To: <87bjmi65h4.fsf@redhat.com> References: <9ab589510f784da2752b72d0b1385afa33aca406.1758634958.git.aburgess@redhat.com> <87cy737q50.fsf@tromey.com> <87zfa26gxp.fsf@redhat.com> <87o6qi6dwn.fsf@redhat.com> <87jz166al5.fsf@redhat.com> <3996ddc9-2cb4-4ead-8895-5d6b27b5a72c@suse.de> <87bjmi65h4.fsf@redhat.com> Date: Wed, 08 Oct 2025 10:29:40 +0100 Message-ID: <874is968sb.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: -oDKCn6ezGjVGQ4Vr0-RYA67dNX5zR6K0mYQkx5Z3ag_1759915782 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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 Andrew Burgess writes: > Tom de Vries writes: > >> On 10/7/25 16:38, Andrew Burgess wrote: >>> Andrew Burgess writes: >>> >>>> >>>> Thanks for the diagnostic help. I'll work on improving the test to try >>>> and catch these cases. If that works, then we might be able to adopt >>>> this to help with other tests. Keeping this in mind, I'll add helper >>>> functions to lib/gdb.exp. >>> >>> Hi Tom, >>> >>> At your leisure, could you check that the patch below resolves the FAIL >>> you reported please. >>> >> >> Hi Andrew, >> >> on Leap 15.6, yes. >> >> On Tumbleweed, unfortunately no. > > > >> (gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: capture Python based mappings data >> shell diff -s /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile-out-1.txt /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile-out-2.txt >> Files /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile-out-1.txt and /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile-out-2.txt are identical >> (gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: diff input and output one >> show-build-ids >> Objfile Build-Id Core File Build-Id File Name >> 91c6abb593a519ecd18e543eaac25f913999b230 91c6abb593a519ecd18e543eaac25f913999b230 /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile >> Python Exception : 'corefile' >> Error occurred in Python: 'corefile' > > It looks like there's an objfile discovered via > Inferior.progspace.objfiles(), which doesn't correspond to a file mapped > into the core file. FYI, I only consider objfiles that are _actual_ > files, so ignore things like [vdso], etc, and I only consider objfiles > with a build-id. I figured that everything meeting this specification > had to be something that would appear in the core file... > > The patch below will make the show-build-ids command a little more > resilient, when a file is missing it'll print "missing" in the column > now, rather than throwing the KeyError. > > My guess is we'll find the same file under different names maybe? Just to follow up, I setup a Tumbleweed VM. I was able to reproduce the original issue you reported, but for me, the patch I posted[1] resolves the issue. If you apply the snippet from [2] this should avoid the KeyError exception, and should allow us to debug the problem. Thanks, Andrew [1] https://inbox.sourceware.org/gdb-patches/87jz166al5.fsf@redhat.com [1] https://inbox.sourceware.org/gdb-patches/87bjmi65h4.fsf@redhat.com