From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aVbqEDp/emo37RsAWB0awg (envelope-from ) for ; Mon, 10 Aug 2026 21:47:38 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=FM59UQ1w; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2B7A51E166; Mon, 10 Aug 2026 21:47:38 -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.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 81BA91E033 for ; Mon, 10 Aug 2026 21:47:37 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AED794BB5881 for ; Tue, 11 Aug 2026 01:47:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AED794BB5881 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=FM59UQ1w Received: from dragonfly.ash.relay.mailchannels.net (dragonfly.ash.relay.mailchannels.net [23.83.222.51]) by sourceware.org (Postfix) with ESMTPS id D721E4BB3B8D for ; Tue, 11 Aug 2026 01:47:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D721E4BB3B8D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=palves.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D721E4BB3B8D Authentication-Results: sourceware.org; arc=none smtp.remote-ip=23.83.222.51 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786412828; cv=none; b=tm1ACDUnK4nvOyg0l9n774Sqv2xcM6htEDTskK1r9b8kw4oWfsf8Fx224MqEIolBp0hY1fvY9SiFg4fkeSiEStlP4NSTdUPHORgFV4OgXISsMmYt3XLfEo8VmVt7FlT8pIQ/ZqJ8RjsS1hFtmUwptgSpfxmah1Sc/u5cYKx0OSE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786412828; c=relaxed/simple; bh=7VVMxeRkQR7nbejTLz7p/jdnEzQxvTIGMiSVZhcBdhs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=U5VFChOkXmxip8sclq07cd+Y9QnqcUfY/8sQg8jNSw0nMZEvQH1hY8ardcaAr7YJvH2p7WPCJ2QJSGUfFCBTizFetPxjfHgvXCIEh350s20g0nEmoe+aO9tAjL391jQNB4hblB+wTgk16G9cAdm7TeSF1LlgH1v8GaBvsKQeQmk= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=FM59UQ1w DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D721E4BB3B8D X-Sender-Id: dreamhost|x-authsender|pedro@palves.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 7515C4E2389 for ; Tue, 11 Aug 2026 01:47:06 +0000 (UTC) Received: from pdx1-sub0-mail-a258.dreamhost.com (100-108-77-198.trex-nlb.outbound.svc.cluster.local [100.108.77.198]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 549AD4E213B for ; Tue, 11 Aug 2026 01:47:06 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|pedro@palves.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|pedro@palves.net X-MailChannels-Auth-Id: dreamhost X-Trade-Inform: 15e3e32e198ddb71_1786412826381_1298200526 X-MC-Loop-Signature: 1786412826381:2660989729 X-MC-Ingress-Time: 1786412826381 Received: from pdx1-sub0-mail-a258.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.108.77.198 (trex/8.0.2); Tue, 11 Aug 2026 01:47:06 +0000 Received: from localhost (bl21-204-140.dsl.telepac.pt [2.82.204.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pedro@palves.net) by pdx1-sub0-mail-a258.dreamhost.com (Postfix) with ESMTPSA id 4hJvcn5r4lz105D for ; Mon, 10 Aug 2026 18:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=palves.net; s=dreamhost; t=1786412826; bh=ixTbLaGif68PuUd29tgcAo/S3PFKMbXTTJZtXHcaYoU=; h=From:To:Subject:Date:Content-Transfer-Encoding; b=FM59UQ1w1VbGs3Jmb9yqNcMZPhgoviwBuMOH9Cucwa+YvrfHIZAmLBl2pRBNV4UVx glDy5+2xq3AqLlzL+AfqG6znYDXsqhBkEdMem7YkEGPFu2OzXdIo8X9UOo7OfopF23 OxP6omqTnQKsbuHhhU12bNjcqEUGTsal0Y2U6ufMzzHlc/YH1j0a6/xoMkC06m5DqN elRnUw2wJX8DwlPP4sfRCSWNF8SBbFxfAkwMYXT81+445H4zJy3D2/uSxy0k1Obc2D rbcZ1wvwCSJgviZbcIm33nE1fDxdrPoVh5rzqcxWbwcqh0qJBv2eRoQMun3/aoPGz3 aBwr4mC2x8bBQ== From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 3/7] gdb/testsuite: Let gdb_simple_compile take empty default flags Date: Tue, 11 Aug 2026 02:45:54 +0100 Message-ID: <20260811014558.3606251-4-pedro@palves.net> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260811014558.3606251-1-pedro@palves.net> References: <20260811014558.3606251-1-pedro@palves.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 I noticed this while renaming nodebug to symtab. gdb_simple_compile and its wrapper gdb_can_simple_compile take a default_compile_flags argument that, when left unspecified, defaults to a debug build ("debug nowarnings quiet"). The check for "unspecified argument" is: if { $default_compile_flags == "" } { which makes the default indistinguishable from a caller explicitly passing "", so there was no way to ask for a build with no default flags at all -- passing an empty list still gets you the default flags. Fix this by using a distinct "DEFAULT" sentinel for the unspecified case instead. Note no caller passes an explicit empty default_compile_flags today. Change-Id: I30235fa1d28eb93dfdf08248af26669a7336d708 --- gdb/testsuite/lib/gdb.exp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index d34ac30f2f0..b268152bdb7 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -6293,7 +6293,7 @@ gdb_caching_proc universal_compile_options_assembly {} { # Return 1 if code can be compiled # Leave the file name of the resulting object in the upvar object. -proc gdb_simple_compile {name code {type object} {compile_flags {}} {object obj} {default_compile_flags {}}} { +proc gdb_simple_compile {name code {type object} {compile_flags {}} {object obj} {default_compile_flags DEFAULT}} { upvar $object obj switch -regexp -- $type { @@ -6331,7 +6331,7 @@ proc gdb_simple_compile {name code {type object} {compile_flags {}} {object obj} } set src [standard_temp_file $name.$ext] set obj [standard_temp_file $name.$postfix] - if { $default_compile_flags == "" } { + if { $default_compile_flags eq "DEFAULT" } { set compile_flags [concat $compile_flags {debug nowarnings quiet}] } else { set compile_flags [concat $compile_flags $default_compile_flags] @@ -6357,7 +6357,7 @@ proc gdb_simple_compile {name code {type object} {compile_flags {}} {object obj} # Return 1 if code can be compiled # Delete all created files and objects. -proc gdb_can_simple_compile {name code {type object} {compile_flags ""} {default_compile_flags ""}} { +proc gdb_can_simple_compile {name code {type object} {compile_flags ""} {default_compile_flags DEFAULT}} { set ret [gdb_simple_compile $name $code $type $compile_flags temp_obj \ $default_compile_flags] file delete $temp_obj -- 2.54.0