From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id cZP2GUwbgWmTziQAWB0awg (envelope-from ) for ; Mon, 02 Feb 2026 16:46:52 -0500 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=Wxzk5cRX; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 653C41E0BA; Mon, 02 Feb 2026 16:46:52 -0500 (EST) 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 B45751E08D for ; Mon, 02 Feb 2026 16:46:51 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 177C84BB58E1 for ; Mon, 2 Feb 2026 21:46:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 177C84BB58E1 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=Wxzk5cRX 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 024EE4BA9035 for ; Mon, 2 Feb 2026 21:46:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 024EE4BA9035 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 024EE4BA9035 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=1770068786; cv=none; b=HPcEb7yk/aPewJYWffXh99CIZc5APEMnbgMLQncO+BHfzDhChbtR+DL7GR5w0IGjOixfeyNhVS/3nwWEwx8DOT9bpKzV1Qhp+NZwEesc/H91Zg+QxHNTpCYRdH92B0fZwG+j6hWXEGu5Kq09pKa/Bv98WTeTdN0axALC1g9CUbs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770068786; c=relaxed/simple; bh=u7nFp5CCZSxA9i7BIRzfvACT0pVzcLuLj74a1WCZ7jw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=pzkQ6f+DjOL6UEdWoNHZSgapAg69VHWlm9KsheQYg7a5Y6fDsCIErqiT8z5eP65N4VfhYAfKdhRjv7daXswaTHPggjHsjQD5tIxNGIGBiLLY9CFLcbTcqMmseJrbS2FydipfM1J1fnwwK1ZrzSVstPsVNPoYgFqjLWRFLyZ4JWI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 024EE4BA9035 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770068785; 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=JjRmgfstYZLVcuo8ZgUD0HjhaTWDww4QGxN3LlC0bHo=; b=Wxzk5cRX017KR1OXdP90DI5hEiGtlqUtCtFnpeOVuuDzi7lPB1h2WidGU3z+jkIN7bJBGA wI1h5ZVnQP3pF17NYm3hMsraFxFwJ89r4M43bMiejJ3hR9luFmkgXyElsIIzHDBuB6yPNG r0aoOeDcjy+PbC296/4zDS2SJeL1hKw= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-127-Mi2heei5MZySygD1TASNhg-1; Mon, 02 Feb 2026 16:46:24 -0500 X-MC-Unique: Mi2heei5MZySygD1TASNhg-1 X-Mimecast-MFC-AGG-ID: Mi2heei5MZySygD1TASNhg_1770068783 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-435db9425ebso4871012f8f.1 for ; Mon, 02 Feb 2026 13:46:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770068783; x=1770673583; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JjRmgfstYZLVcuo8ZgUD0HjhaTWDww4QGxN3LlC0bHo=; b=lYjRmLZEzFIj2zi09JixhQs3wEUK0B0pg8O4LSc1Vv04kUwFdpdx8aNwTDGvHjlIRA 7rGHF7qzPSaBjp6g96anhUgV/kPul0K2AYhUWYu7ngjKwyRq8tpaG6VrhEEuuGAEuWzc WVd02Igmqaw7eEVGrWE4h3xDCMd9e6QHHt2lloz5Ly1obMHHx9iHDV+84skhf7xMuhWL ykupILAsxHUUhjnIFkbL1loDsAcy2U3wGw2wb56aoRxXyim6prBMWTE25SqO4p0yWzMR eMlUzV+KdMdhS31MDj1bgqr8k7GC+DPNBjmoSZK+u4/LTxKmLcLGOerzbHSue1+IKbiS zDsw== X-Forwarded-Encrypted: i=1; AJvYcCVsUg2vMYjdl35B3Gh5YhfJX88Fm7vMhdtemfPTUdTIEhmxO0pqlypNSW2/ElYa/SrjMhg5K53GR4bBgA==@sourceware.org X-Gm-Message-State: AOJu0YwRBiTv00sWchwcMUp4EJdZy20OhZAe5oBP3UH4srvBFLgVd23d b26SU6sM2AmPYEeQLsXVF4qdTghTHY7aqKeFRtxAqWDRGlh1mzvrihwNuhUgcz63RuFiZ0YUqpJ 7PvOaAVh/doMiDU9pu8TPv72t138llJ88+4Dq9l6+lNCj2hy4dGaQF1fodkPdDQK5amDba8k= X-Gm-Gg: AZuq6aKf7sWsk3CFMZaCqjwDIulUcHs/YimI039ShJGT3f6UVvrriPDd9B8rfO8iJLk 0/kEqSkjVHRn/0J4RS08NAjPRe8D6cDGLhaolZOJ8it1OxvcWNrOKj1iIf2JoP+2O9oB1ZQ5IhC qenr2gbovCojBavNVWgIHfu3x5l/lPWQY2uk/hHqZAUFyVlrHHzkWK74u4rnN63EcmaPpG19tHB xDvPEKahT0Kz/nViZMpgqed5LdkIwsZFfJp2af14vCmIRYlEC1P6cANfTHsmZ8O2UZj0jA+Tpio ZMu8etnOSFx4q2tceETBYICb/5ukrs2wmHZ8/4BK8w6LkC+bgLvje/CjNvArYlAUNE3Pg4r9gR7 NXrHE X-Received: by 2002:a05:6000:40c9:b0:430:fd84:315a with SMTP id ffacd0b85a97d-435f3ab26ecmr19081699f8f.39.1770068783033; Mon, 02 Feb 2026 13:46:23 -0800 (PST) X-Received: by 2002:a05:6000:40c9:b0:430:fd84:315a with SMTP id ffacd0b85a97d-435f3ab26ecmr19081678f8f.39.1770068782686; Mon, 02 Feb 2026 13:46:22 -0800 (PST) Received: from localhost ([31.111.84.232]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435e1322eefsm47799445f8f.30.2026.02.02.13.46.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Feb 2026 13:46:22 -0800 (PST) From: Andrew Burgess To: Guinevere Larsen , gdb-patches@sourceware.org Cc: Guinevere Larsen Subject: Re: [PATCH] gdb: fix filename matching in skiplist_entry::do_skip_gfile_p In-Reply-To: <20260202203404.708144-1-guinevere@redhat.com> References: <20260202203404.708144-1-guinevere@redhat.com> Date: Mon, 02 Feb 2026 21:46:20 +0000 Message-ID: <87zf5qes43.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: QsXeZx1xal7zVc78Ye6YmP8OFEYlhETUYaEixjVjhwo_1770068783 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 Guinevere Larsen writes: > GDB is incorrectly matching -gfile skip entries. This is a regression > introduced by the following commit: > > commit 02646a4c561ec88491114b87950cbb827c7d614c > Author: Fangrui Song > Date: Sun Dec 29 14:57:44 2024 -0800 > > skip -gfile: call fnmatch without FNM_FILE_NAME > > The author made the reasonable, but unfortunately incorrect, assumption > that glibc's fnmatch, and consequently gdb_filename_fnmatch, will return > the integer equivalent of a boolean (that is, 0 if the filenames do *not* > match, non-zero if they match), but that is incorrect. This made it so > using `skip -gfile` would skip all functions except the ones that are > meant to be skipped. This commit fixes that inverted logic. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33872 > > --- > gdb/skip.c | 3 ++- This needs a test please. The fix itself looks reasonable enough though. Once there's a test, this should be merged to gdb-17-branch and master. Thanks, Andrew > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gdb/skip.c b/gdb/skip.c > index 1255c7d2152..ba2f22058ec 100644 > --- a/gdb/skip.c > +++ b/gdb/skip.c > @@ -548,7 +548,8 @@ skiplist_entry::do_skip_gfile_p (const symtab_and_line &function_sal) const > /* Note: symtab_to_fullname caches its result, thus we don't have to. */ > const char *fullname = symtab_to_fullname (function_sal.symtab); > > - result = gdb_filename_fnmatch (m_file.c_str (), fullname, FNM_NOESCAPE); > + result = gdb_filename_fnmatch (m_file.c_str (), fullname, FNM_NOESCAPE) > + == 0; > } > > if (debug_skip) > > base-commit: a6d46a04ea3e165c0ce2f11cd9d68bdcb81f4e4e > -- > 2.52.0