From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id l8NPL1dlSGgxmwgAWB0awg (envelope-from ) for ; Tue, 10 Jun 2025 13:03:19 -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=IfNZPrzH; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 9D1971E11C; Tue, 10 Jun 2025 13:03:19 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-10.1 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, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE 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 C7AD91E0C2 for ; Tue, 10 Jun 2025 13:03:18 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 66C073858CD1 for ; Tue, 10 Jun 2025 17:03:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 66C073858CD1 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=IfNZPrzH 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 4E582386F00A for ; Tue, 10 Jun 2025 17:02:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4E582386F00A 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 4E582386F00A 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=1749574929; cv=none; b=r80MyOCr/wSCMtomqzTGQOMHIFcxDN6qQni1RSC6TbtstkfR8afHugtpvt6de+Va+g3pUr3n/uhcB3yQesflE9at5eqpccMZ1WtTo3Ss98LxWAw8c2Id2DZd/0/npPmsjj8IYoJJctYVFk5NmO1j9etEe4Nxfyxpxz5Gz3p3UKo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749574929; c=relaxed/simple; bh=m1UYFqtbjfMxUGiDWeELu+vwpWSl5ZGpXZ+v+Gr4xXo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=iddzmduVr3OY0GRRwsGOL2s1QQmevKr/g26DBLz+QjY2qGPd8rpw1SDQzxCN02YywTM+BMULouL4xqiKP0NEROVzU3Rj15RpxHps5LjwXH79NIZsyUICTRU0BY00P86oEDdjzzixchafaLs3Qr3d21U4crzsMRX+bBVkJed3h/0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E582386F00A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1749574929; 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=EHeEFz7qrfuQaDltO/fXu5nNE0W6uJ+dlmeU9+e77nc=; b=IfNZPrzHbsNKJyrlA97CAqMay0sSDkbMt05cGOvlVP+Y+0vliZhP9buC4tuoe4Rc141Xel TX0Q9v3cX7MqIKOeFrZLBjH9aMMn3E/Nehunz5BtnsnruPJp1TBCbZyvHb9qZ+RLp8AyxD JlTAfIhitvRue44awkM/0sb5KGNUBAE= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-31-StDgAGSsMKKnieBmdlSZJA-1; Tue, 10 Jun 2025 13:02:07 -0400 X-MC-Unique: StDgAGSsMKKnieBmdlSZJA-1 X-Mimecast-MFC-AGG-ID: StDgAGSsMKKnieBmdlSZJA_1749574927 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-451ac1b43c4so32309135e9.0 for ; Tue, 10 Jun 2025 10:02:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749574926; x=1750179726; 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=EHeEFz7qrfuQaDltO/fXu5nNE0W6uJ+dlmeU9+e77nc=; b=Eno3wfcX9i7GDUv/qndeyMHmPlqx6T9z1sjOuyhOtsok63F118amTQ/iB1Bsj4vgtB YReAOGfR3Ly1/s234GDYcD90PM+wFxllPWRyh/FPxWoM12ssNPgd7D/b/2Yjx36HOcEn 7TGNlrrkPWacMHdgMugkUrcTuIOQIuvxOntT/a+zRlrTYAESsR3UiADZY2s8IV8jWyvc 3elV5xTotGQCeimLdZL4QqUSkYswbEm85cKkZATsqYuh65DbwsgNYKO8MxXm3hEz6nGE qpk7Svm+8Wo0C6pcVbzsTGH/MWYSeAjaQhRldF+7oOpC6RwIC06ma6uAaLz8ZiX2fNOJ aERg== X-Gm-Message-State: AOJu0YyihXb6B2czseLgJUyRwqVWlDzWA7hvWkbDIP1Jzh81DDmpEjmf haAwHL9+2lMvhyDwznAT2F0MjcW2qZ9tUG6b+rFvdB8he4WvyZ7LFYSi9nP8wuLX865Zlo0fVwJ 8UHGMWfgxvLpnxbK+v+JKiPtjjKQcraxwmu/g52UVsnZxstJw5pIAn+1ANMcsTVVqpI2UzRs= X-Gm-Gg: ASbGncvw15j5K9iFOh7lJPOJS6vnL8TDRrk1zXyX/dCsdz+rulfF9zNuNQeCOFE6wrB e7i0JY7neQ4F+zKmRZexUmt/h7Wy5jLMpQnMEbXYXONRC5BTBpxi24zxXNz9AYIEfMIc4jYQvTH rxmNO4xAWYERNgWsnje66NgFDtwwKlWxEgAO4KDt8v3hJE5NqswjTjBLGGDR6qkbLcnkiWWyXIP N7D9Rv49NErum2PO4CU43Y6zXuX9Pyprdu0vD71VXWdwO261XiH/HNMr8wYV6Aodr+gF2Pa6IhF dNd0RUtdP6+n3XnPQRUfLS7v52crCaqwmin59VUyJqE/pi0= X-Received: by 2002:a05:600c:a49:b0:43c:f513:958a with SMTP id 5b1f17b1804b1-452014165a9mr175583485e9.13.1749574925122; Tue, 10 Jun 2025 10:02:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE0zOGFO9XWWoOJ+nfbzHnK60L4+YbEtGigFeZiluz0gEjWY/Vqtjz93iXkpVc3HMuf/vg+TA== X-Received: by 2002:a05:600c:a49:b0:43c:f513:958a with SMTP id 5b1f17b1804b1-452014165a9mr175582725e9.13.1749574924398; Tue, 10 Jun 2025 10:02:04 -0700 (PDT) Received: from localhost (75.226.159.143.dyn.plus.net. [143.159.226.75]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a532462d93sm13051629f8f.91.2025.06.10.10.02.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jun 2025 10:02:04 -0700 (PDT) From: Andrew Burgess To: Tom Tromey , Fabian Kilger Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 0/2][PR GDB/32956] gdb: fix GDB failing to find build-id debug files in linux mount namespaces In-Reply-To: <87y0ud280g.fsf@tromey.com> References: <20250511150113.3163767-1-kilger@sec.in.tum.de> <87y0ud280g.fsf@tromey.com> Date: Tue, 10 Jun 2025 18:02:03 +0100 Message-ID: <878qlzil84.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 1MgF_Str55fOnh4b31rMP-S3rT4QJjZygjeRPk8tkfU_1749574927 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 Tom Tromey writes: >>>>>> "Fabian" == Fabian Kilger writes: > > Fabian> GDB can no longer find build-id debug files in docker containers. > Fabian> The cause is the new algorithm to look for a build-id-based debug file > Fabian> (introduced by commit 22836ca88591ac7efacf06d5b6db191763fd8aba). > Fabian> It makes use of fileio_stat. As fileio_stat is not supported by > Fabian> gdb/nat/linux-namespace.c, all stat calls would be performed on the > Fabian> host and not inside the mount namespace. Furthermore, gdb/build-id.c > Fabian> calls target_fileio_stat with inferior none, thus stat will always be > Fabian> performed on the host mount namespace instead of the target's mount > Fabian> namespace. > > Fabian> The patch is split into two parts: First, add support for fileio_stat > Fabian> querying the linux mount namespace and second, adjust gdb/build-id.c > Fabian> to call target_fileio_stat with current_inferior () instead of nullptr. > > Fabian> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32956 > > Hi, I don't know anything at all about this area, but some keywords in > the thread triggered a memory of this patch: > > https://inbox.sourceware.org/gdb-patches/20230321120126.1418012-1-benjamin@sipsolutions.net/ > > Can you say how it compares and whether your patch fixes that same > problem? Tom, I don't think this series is addressing the same issue as the patch above. I tested the issue from the above patch with this series, and it's not fixed, and looking through the change, I don't think they're the same problem. However, after looking at the patch you linked, I figured writing a test would be pretty easy, so I cleaned the patch up, added a test, and posted it here: https://inbox.sourceware.org/gdb-patches/bc0e9b34f695afb0e14fd2fa1301bd0e44dd7b9b.1749574641.git.aburgess@redhat.com Thanks, Andrew