From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0b92A/V9vmplRCQAWB0awg (envelope-from ) for ; Thu, 01 Oct 2026 11:36:21 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=Hmj9IjHO; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 086531E01F; Thu, 01 Oct 2026 11:36:21 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::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 77C191E01F for ; Thu, 01 Oct 2026 11:36:20 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 25F964BB3BD5 for ; Thu, 1 Oct 2026 15:36:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 25F964BB3BD5 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=Hmj9IjHO Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) by sourceware.org (Postfix) with ESMTPS id 71C364BA79B8 for ; Thu, 1 Oct 2026 15:35:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 71C364BA79B8 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 71C364BA79B8 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=44.202.169.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790868953; cv=none; b=C/cq6YJ6hulHlviPjB1mVizcJaKqbV0g83w4maTaCZC09HgpAlqFN8sXhcwM60mHJIcTRwxDIMBnZ6sRTzmRK2SlBn39xtxg6hCjU9xuKmp+R0y0us1x/xLhJzA/DVzRbMdDAgApMOZTKjc53PYkr4cZ4VXa8rdzreLW6gUBDOk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790868953; c=relaxed/simple; bh=k94FI5X8Sw/j+W5/hDWVfzL7GCWPyzF1fmJ9RnoxB7Y=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=bzS4eL2H8kcIfDiFpEhcO/++ZK0zfQLgWz1Ojg5ELCwOLYEuMvsYD0pHjqKRfIZnriuVM2ZosMysbY7H7/FFdeML+casequV+ZVU9+0rriMf/z2un2zuopzyFO4WOZzNXXkulA4LgPi8OyYi2sw1K7TK5pkEvsQhdaqyr6M/+/k= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=Hmj9IjHO reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 71C364BA79B8 Received: from eig-obgw-6002b.ext.cloudfilter.net ([10.0.30.203]) by cmsmtp with ESMTPS id BzXAxKFEALvgbCIp5xWb5y; Thu, 01 Oct 2026 15:35:51 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id CIp4xaGZoRC6eCIp4xZG8D; Thu, 01 Oct 2026 15:35:50 +0000 X-Authority-Analysis: v=2.4 cv=FvsF/3rq c=1 sm=1 tr=0 ts=6abe7dd6 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=660iZSQnnn4A:10 a=ItBw4LHWJt0A:10 a=mDV3o1hIAAAA:8 a=_ZhYKdCeAAAA:8 a=asp7WibbucWoqDkQymIA:9 a=uqOk3ZSnBfCTOznnrPA1:22 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=m2Aw1iMRjWf/lONaUFadz+1nMgG0NELnSSH/3osppuU=; b=Hmj9IjHO4ij7Uq3o0J60vBR9A7 ECS9Igtp0LGeA5rPwiRm7cPcn3WQbyJJ1QRWccHLbp9XeiyKgtvCzmUiXu1pvjv9PoKIsazwaTpZ7 banDA4BHbPo8DKVeJYGu7PF5K; Received: from 75-166-229-74.hlrn.qwest.net ([75.166.229.74]:52192 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xCIp3-00000002OeP-3IRR; Thu, 01 Oct 2026 09:35:49 -0600 From: Tom Tromey To: Simon Marchi Cc: Andrew Burgess , gdb-patches@sourceware.org, Simon Marchi Subject: Re: [PATCH v2 01/11] gdb: add symbol_search_kind enum for global_symbol_searcher In-Reply-To: <15465f38-b454-4e6e-9c32-625f6262d6df@polymtl.ca> (Simon Marchi's message of "Thu, 1 Oct 2026 09:22:11 -0400") References: <20260929194119.155169-1-simon.marchi@efficios.com> <20261001020952.698419-2-simon.marchi@polymtl.ca> <87cxttzp9p.fsf@redhat.com> <15465f38-b454-4e6e-9c32-625f6262d6df@polymtl.ca> X-Attribution: Tom Date: Thu, 01 Oct 2026 09:35:48 -0600 Message-ID: <87v77lfn6z.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.229.74 X-Source-L: No X-Exim-ID: 1xCIp3-00000002OeP-3IRR X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-229-74.hlrn.qwest.net (bapiya) [75.166.229.74]:52192 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfJuybc494yMsFP/1DNWGZwLw3tlQIbCQOUI0O+CQS6c8K2DWAc68cmLO1BIEPZ6GKwgSupzb1Qnq5HLb3wrTDuTS0TJLWnXlPMN/LkK9Ei/uVpiKTN/+ E+Xo7OG26TlOAMtmqxB8SiWDABf+TdiP9npCQU9Db2o97NarqiO2bJ0RIImBQoCYbCWL6uLDn1EYdkqkytBQfhqLUu7T0FSpzn4= 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 >>>>> "Simon" == Simon Marchi writes: Simon> You're right, I applied the suggestion without thinking too much about Simon> it. We definitely want an assert to fire instead of printing from an Simon> uninitialized pointer. If that same code was in a function of its own, Simon> I would have done it like this: [...] Simon> I'll initialize the variable with nullptr and add a nullptr check after Simon> the switch. I prefer this over the default, because if we ever enable Simon> -Wswitch (which will probably never happen, I tried it before and it was Simon> painful), then we'll get a compile-time error if we are missing a case. I tend to think that only some subset of switches really need this treatment anyway. A while ago I asked for an easier way to enable -Wswitch-enum selectively: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108811 I guess we could accomplish this today with _Pragma if we didn't mind wrapping such switches in begin/end pairs. I think -Wswitch-enum is maybe better than -Wswitch and in the switches that matter, gdb shouldn't have a 'default', just a total enumeration of cases. Tom