From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MpNuKSXoHWnTBRQAWB0awg (envelope-from ) for ; Wed, 19 Nov 2025 10:54:13 -0500 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=h2QH7/N8; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 967DE1E048; Wed, 19 Nov 2025 10:54:13 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no 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 ACB381E048 for ; Wed, 19 Nov 2025 10:54:12 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CD4413852748 for ; Wed, 19 Nov 2025 15:54:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD4413852748 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=h2QH7/N8 Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id 07E323858C41 for ; Wed, 19 Nov 2025 15:53:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 07E323858C41 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 07E323858C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763567620; cv=none; b=b1CdSpAJVv3giX9ondQDtCzNKRlndtubv8HJwL8C6wfREn8BcCUncKDxUK4XPtP9BozmaQ2WVn94c+I0mnBkMBXQ3pelvNxlBpZ45V9h3ighd+LXdEHpo5T8toTG6SEaMnDwP8CptGqae7ZaYW5HjdXmMH+k03oFQ9pTlFLoh7o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763567620; c=relaxed/simple; bh=JZNOMtNya35Tt+QncC39vOGLA92Ob11LReC6Ru4SRkw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=LH3lJR+P6eGPvagyYCUh9DsaubsfR/HJLkjk5uVqsDQpflam5MgCOxU6f5UWon+NZfHf+m+NBZc+5X38HdCkwtCy4mcQEPgJba4R20Vw+Jr22Z6vxin8TQGe6bm38Y7xNwqN9mAJfCx5JldaFXZ696TfwNmlZSP3621h40oK6Yk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 07E323858C41 Received: from eig-obgw-5005b.ext.cloudfilter.net ([10.0.29.189]) by cmsmtp with ESMTPS id LkSVvCdktSkcfLkV1vlmEY; Wed, 19 Nov 2025 15:53:39 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id LkV0vLVczS30ULkV0vXXyH; Wed, 19 Nov 2025 15:53:39 +0000 X-Authority-Analysis: v=2.4 cv=J+aq7BnS c=1 sm=1 tr=0 ts=691de803 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=6UeiqGixMTsA:10 a=ItBw4LHWJt0A:10 a=7d_E57ReAAAA:8 a=5CZNEzPOFWm7xx7SeVMA:9 a=jhqOcbufqs7Y1TYCrUUU:22 a=VS4QxaUSPT0UtbFnIvSC: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-Subscribe: List-Post:List-Owner:List-Archive; bh=d18fyrSmrR3rpdDZkWL6ZDNzdD2bCbdFTpbrtPjSOzw=; b=h2QH7/N8rVHrBWr5AUHwAucF7e +TaKNMrIv1CU/tlvHHoTTPKClDFA7SBAD/RUXp66rgKFQ3SaykyHcezPD48wCuhDllx8gefGuIUrE tH1+hjTXQuz2QNKLeFxej3l9v; Received: from 97-122-120-205.hlrn.qwest.net ([97.122.120.205]:40584 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vLkUz-00000003am3-494n; Wed, 19 Nov 2025 08:53:38 -0700 From: Tom Tromey To: Simon Marchi Cc: gdb-patches@sourceware.org, Simon Marchi Subject: Re: [PATCH 2/6] gdb/testsuite/dwarf: convert _section proc to use parse_options In-Reply-To: <20251107211041.520697-3-simon.marchi@efficios.com> (Simon Marchi's message of "Fri, 7 Nov 2025 16:10:13 -0500") References: <20251107211041.520697-1-simon.marchi@efficios.com> <20251107211041.520697-3-simon.marchi@efficios.com> X-Attribution: Tom Date: Wed, 19 Nov 2025 08:53:37 -0700 Message-ID: <87v7j6qari.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: 97.122.120.205 X-Source-L: No X-Exim-ID: 1vLkUz-00000003am3-494n X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-120-205.hlrn.qwest.net (bapiya) [97.122.120.205]:40584 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfGR/AfCITO3J8s9c9ec95XM52uS568XOW2FTfwnkFjsVzw9dEPozWEKpW0mO3fGVkvwKNZpJfo76oWSYME281+x45Pq7jeNAGbMimcSMLKBvktYqW2HH UJZ/5xGBoKoNS8sOjzciVJPhpcM7LidhBfqJcXv/gZbPjzZo6KD1erD0r8CQZVSV3TCpwecOxRm6BbjsGmh8M1/j8FweHjc+alM= 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: I meant to send this last week but forgot. Simon> - proc _section {name {flags ""} {type ""}} { Simon> - if {$name == ".debug_str"} { Simon> - # Hard-code this because it's always desirable. Simon> - _emit " .section $name, \"MS\", %progbits, 1" Simon> - } elseif {$flags == "" && $type == ""} { Simon> - _emit " .section $name" Simon> - } elseif {$type == ""} { Simon> - _emit " .section $name, \"$flags\"" Simon> - } else { Simon> - _emit " .section $name, \"$flags\", %$type" This code ignores flags and type if name is .debug_str, but the replacement code: Simon> + if { $name == ".debug_str" } { Simon> + # Hard-code this because it's always desirable. Simon> + append directive ", \"MS\", %progbits, 1" Simon> + } Simon> + Simon> + if { $flags != "" } { Simon> + append directive ",\"$flags\"" Simon> + } Simon> + Simon> + if { $type != "" } { Simon> + # Can't specify a type without flags. Simon> + if { $flags == "" } { Simon> + append directive ", \"\"" Simon> + } Simon> + Simon> + append directive ", %$type" Simon> + } ... does not. I think the old code was clearer in this regard. I didn't read forward in the series to see if this restructuring helps newer code though. Anyway this change should be addressed. Tom