From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Yd8KED8PYWpmgSYAWB0awg (envelope-from ) for ; Wed, 22 Jul 2026 14:43:11 -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=fe/+ptJ3; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 3D6571E09E; Wed, 22 Jul 2026 14:43:11 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.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 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 8A4D81E033 for ; Wed, 22 Jul 2026 14:43:10 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 862814BA2E07 for ; Wed, 22 Jul 2026 18:43:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 862814BA2E07 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=fe/+ptJ3 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 9E91E4BA2E08 for ; Wed, 22 Jul 2026 18:42:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9E91E4BA2E08 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 9E91E4BA2E08 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784745764; cv=none; b=UQt8T78/E961vi8/LDNyATIqHkiLRwwAZxCwDQjxr9R3tjmt2I/YZzGla9ShGtUoFILdC03OLQoJXvrX5aAA3Zs5QK3jKKQFMkIECJ8ufkJTpcLfBr15JBp42bTm+AwtPs7koeOtuaHlWYUbQMc/QJuyFp67H1vOiNUGuxlhM7U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784745764; c=relaxed/simple; bh=IcK1JEMtL6dyZHofdmoHGa7+33mI6/MhHRvD6QGWTZk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=vob/NhcAE+sxN4ps7/TQYFg/U+cDAOuCKQ2SZ7VaEWE9mOz/8qVXr/4jlgkfjMSd/de3fTa/nE+kppeOI1vXkEfUNBEbRn+4jfJqq71i5O89eV200ZjX6VldZdftih3m5y9X35FUqqVrfQ1dIbMwNWz7BQVuxBvsQbb0vOA50Gk= ARC-Authentication-Results: i=1; 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=fe/+ptJ3 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E91E4BA2E08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784745764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FL4PX9XQOMUmCcvuQcWBIhyoyCmk3flak95ITMPIAFw=; b=fe/+ptJ3CVoiqeh+fvRTJFJl44McTfaD+c0PnkfTtyHn/frOvdCUfvaboiSk0IML2FWfHH y/hhlzokuUukohxqiMZambR6zDVu2oTvWt1TC21qAd0vtzUUV9bdwJaEKJK8acMB9cnVp3 owdMf6e3dkd4q/qQwYDxiZkzqxprrG0= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-663-wkZoLxqLOJW3zJALUXy1Bw-1; Wed, 22 Jul 2026 14:42:43 -0400 X-MC-Unique: wkZoLxqLOJW3zJALUXy1Bw-1 X-Mimecast-MFC-AGG-ID: wkZoLxqLOJW3zJALUXy1Bw_1784745762 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4955ce558d8so37241315e9.3 for ; Wed, 22 Jul 2026 11:42:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784745762; x=1785350562; h=content-type:mime-version:message-id:date:references:in-reply-to :subject:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=FL4PX9XQOMUmCcvuQcWBIhyoyCmk3flak95ITMPIAFw=; b=ZVFLpWj4gybZ3sxUX/v5PSrIQSetbLmImBQFvutauHwTRQTrOQeYeXD49Ob/nyvaCY lXMVSC9frnyCRH8uVBMHLU/FuuA9aAJsssGFT0cfSkaEAtodXZdAaMxXPBcbsKylNypv DiqcUYffhxZvC8z57qzo76rH/qUr3WcPNo4E1micetOBJHBsUQTMzvdauhtY1BR9Xl2a TyqYg17P2wx+toKMaZCjqxWXEdgBLIwp3Jc93r8bX2fiu/lObdTQnWNsxRuAUtCCCGZn ExcTJT9UmhvHI4OKUTfpF6x1kNvd5olluBHnO8zopvw/fCokNf/aWSx/6MopjPbXRj1u nbLA== X-Forwarded-Encrypted: i=1; AHgh+RruwTS5bQ62FArs2qAW4cA0Gqv0A6y9ENSmMFvnTgrGQ5/N8GRakzYPNCCuS2swfD/2UGxfQ2HnZtAwkw==@sourceware.org X-Gm-Message-State: AOJu0YwwJ4UK0O188/dm2p8SELlsKq1E3pt8iaUT2ggoRkZI60WJIzn6 0cU9mvpg4zfDsEGfy8NnIO4764zOTeBOwDu7Z3p/6HKMiGpjJljQp+OmVqoRvE1q3a3Qix874hP PccN/WweysPHGkSXnjC5JRpsunaxzAbPXyesxi8Ohqfbf5gsIJ0WlCcGFLLF8Phwi/6o+2No= X-Gm-Gg: AR+sD12hk8z9k+u7T8nz3IV9cytX4SOrLShfOQX4IeiELjjyOdZhRVY4p982ta4silt a8JUnZlrI4GoiXZYjF4RccOxbQNdQcAKqKFWxiWUyMJ2BvyBZX4MgT92yi1Y80WgW7eSKSZft2j kzADUTS1qaQotin/PJME8XVw4miYHGM0XpOqLF2G/xUZUzBvcT5mQMdpW3s63Rky1vFtV5MV+xQ 0AiMg9qEHC9R9TffMU4PI3D5LpDQCpjRAxxEbX7wmqUqnWM+HM7Itif3F/0HFvCZrc8VPPS1HG5 cogIIQPjCITJVW30YOGdp4x/zzv8H2TIqw1tjNbjUM/goOlJzxFn/7cfZ/CAawl/xdJryNouEDc e0WLpjRqijpt6N38gpDcK0a/t X-Received: by 2002:a7b:c055:0:b0:492:6f6f:fa42 with SMTP id 5b1f17b1804b1-4954a516ae6mr178469425e9.37.1784745761964; Wed, 22 Jul 2026 11:42:41 -0700 (PDT) X-Received: by 2002:a7b:c055:0:b0:492:6f6f:fa42 with SMTP id 5b1f17b1804b1-4954a516ae6mr178469205e9.37.1784745761489; Wed, 22 Jul 2026 11:42:41 -0700 (PDT) Received: from localhost (92.40.185.177.threembb.co.uk. [92.40.185.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85b9a5c4sm7906203f8f.8.2026.07.22.11.42.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jul 2026 11:42:40 -0700 (PDT) From: Andrew Burgess To: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [PATCH 2/4] gdb.base/callfuncs.exp: Adjust for Windows In-Reply-To: <06c8b831-aa8c-4ed4-8a2d-29065f643f93@palves.net> References: <20260714220631.1499846-1-pedro@palves.net> <20260714220631.1499846-3-pedro@palves.net> <87wluud3th.fsf@redhat.com> <06c8b831-aa8c-4ed4-8a2d-29065f643f93@palves.net> Date: Wed, 22 Jul 2026 19:42:38 +0100 Message-ID: <878q72q31d.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: hZY64dV1lDhjtg1fcfY8Fm-l1B1LmX0AvyiPkDkdWDQ_1784745762 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 Pedro Alves writes: > On 2026-07-16 22:26, Andrew Burgess wrote: >> Pedro Alves writes: >>> Strictly speaking, either of the changes alone would fix it, but I >>> think both are useful to do. >> >> Is this true? After the first perform_all_tests call GDB is still >> running and has the executable file open. Without the separate >> filenames the second build_executable call will try to change the >> executable that GDB holds open. > > Right, that was sloppy last minute editing, didn't think it that well. > Sorry about that. I was originally going to add add a gdb_exit before the > second compilation, but that would end up more complicated, and I realized > I might as well make the programs have different names, and clean_restart is > handy to reload the new executable, and so I didn't need the gdb_exit > any longer... > > >> Not that I object to these changes, I just disagree with the last >> sentence as I don't think the clean_restart change alone will fix the >> problem. >> >> Reviewed-By: Andrew Burgess >> > > I've removed that last sentence, and added "to pick up the new executable." to > the preceding one. > > From a08b0bf87322cc11aace49407382e0f9c4e92078 Mon Sep 17 00:00:00 2001 > From: Pedro Alves > Date: Tue, 14 Jul 2026 19:48:30 +0100 > Subject: [PATCH] gdb.base/callfuncs.exp: Adjust for Windows > > On Windows, gdb.base/callfuncs.exp currently ends up skipping the > "noproto" tests, like: > > UNTESTED: gdb.base/callfuncs.exp: noproto: failed to prepare > > This is because the testcase tries to overwrite the executable while > GDB has the executable still open, which doesn't work on Windows: > > Executing on host: x86_64-w64-mingw32-gcc ... -o .../gdb.base/callfuncs/callfuncs > .../x86_64-w64-mingw32/bin/ld.exe: cannot open output file .../gdb.base/callfuncs/callfuncs.exe: Permission denied > > Fix this with two changes: > > - Compile the prototyped and non-prototyped executables to two > separate executables. This is just what we normally do, so that > it's convenient to test manually against either of the executables. > > - Restart GDB instead of just re-running to main, to pick up the new > executable. LGTM. Approved-By: Andrew Burgess Thanks, Andrew > > Change-Id: I496e0da65f9d484079c5d9a1222104bec39ee98b > --- > gdb/testsuite/gdb.base/callfuncs.exp | 26 ++++++++++++++------------ > 1 file changed, 14 insertions(+), 12 deletions(-) > > diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp > index f2870c577f2..0ac1c603351 100644 > --- a/gdb/testsuite/gdb.base/callfuncs.exp > +++ b/gdb/testsuite/gdb.base/callfuncs.exp > @@ -334,12 +334,18 @@ proc fetch_all_registers {test} { > # Global used by RERUN_AND_PREPARE to make test names unique. > set rerun_count 0 > > -proc rerun_and_prepare {} { > +proc rerun_and_prepare {prototypes} { > global rerun_count > > + clean_restart $::testfile-$prototypes > + > incr rerun_count > with_test_prefix "rerun number ${rerun_count}" { > > + gdb_test_no_output "set print sevenbit-strings" > + gdb_test_no_output "set print address off" > + gdb_test_no_output "set width 0" > + > if { ![runto_main] } { > return > } > @@ -359,11 +365,7 @@ proc rerun_and_prepare {} { > } > > proc perform_all_tests {prototypes} { > - gdb_test_no_output "set print sevenbit-strings" > - gdb_test_no_output "set print address off" > - gdb_test_no_output "set width 0" > - > - rerun_and_prepare > + rerun_and_prepare $prototypes > > # Save all register contents. > set old_reg_content \ > @@ -382,7 +384,7 @@ proc perform_all_tests {prototypes} { > fail "gdb function calls preserve register contents" > } > > - rerun_and_prepare > + rerun_and_prepare $prototypes > # Save all register contents. > set old_reg_content \ > [fetch_all_registers "retrieve original register contents 2"] > @@ -408,7 +410,7 @@ proc perform_all_tests {prototypes} { > } > } > > - rerun_and_prepare > + rerun_and_prepare $prototypes > # Set breakpoint at a function we will call from gdb. > gdb_breakpoint add > # Save all register contents. > @@ -434,7 +436,7 @@ proc perform_all_tests {prototypes} { > } > } > > - rerun_and_prepare > + rerun_and_prepare $prototypes > # Set breakpoint at a function we will call from gdb. > gdb_breakpoint add > # Save all register contents. > @@ -459,7 +461,7 @@ proc perform_all_tests {prototypes} { > } > } > > - rerun_and_prepare > + rerun_and_prepare $prototypes > # Set breakpoint at a function we will call from gdb. > gdb_breakpoint add > set old_reg_content \ > @@ -547,12 +549,12 @@ proc perform_all_tests {prototypes} { > > # Perform all tests with and without function prototypes. > > -if { ![prepare_for_testing "failed to prepare" $testfile $srcfile "$compile_flags additional_flags=-DPROTOTYPES"] } { > +if { ![build_executable "failed to build" $testfile-1 $srcfile "$compile_flags additional_flags=-DPROTOTYPES"] } { > perform_all_tests 1 > } > > with_test_prefix "noproto" { > - if { ![prepare_for_testing "failed to prepare" $testfile $srcfile \ > + if { ![build_executable "failed to build" $testfile-0 $srcfile \ > "$compile_flags additional_flags=-DNO_PROTOTYPES"] } { > perform_all_tests 0 > } > > base-commit: 490469846dcef89fe53668bdbba73591c64bed61 > prerequisite-patch-id: 4252e00ad379be8852a564f351cbd3e3b8a5f0ec > -- > 2.54.0