From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yUSREW2iuGogFgsAWB0awg (envelope-from ) for ; Sun, 27 Sep 2026 00:58:21 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=TWgBCXcB; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=qnjq/Jjl; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=xF0yksdK; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=sxi6wKgK; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 3F36F1E06B; Sun, 27 Sep 2026 00:58: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=-2.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,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 F0C671E033 for ; Sun, 27 Sep 2026 00:58:18 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B4EB4BA9009 for ; Sun, 27 Sep 2026 04:58:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B4EB4BA9009 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=TWgBCXcB; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=qnjq/Jjl; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=xF0yksdK; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=sxi6wKgK Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by sourceware.org (Postfix) with ESMTPS id AB9C34BA9001 for ; Sun, 27 Sep 2026 04:57:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AB9C34BA9001 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AB9C34BA9001 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790485051; cv=none; b=Dm9I8/rKCAg2I5Ktsmip9O1kCIgWpWbWB6v+EwtzQkHG75Mb9WwgWjYNsK8rbZucgNee1cgWFusppaO2csMFiYZTyU8j5eMy4/TB0RxMvEJq9UgUE8xvq542SW/HNBJPlK7g8Gkjr4gTieKo8ruWcXayaBEh/E8ERMdg7Dh/u3c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790485051; c=relaxed/simple; bh=//8bGEDiYuFKfT2tO84nHn3AgOS4sJ4J/vG8q3zsCYU=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=NA1PGzp8s1Ri4cCPnPHSpZaMUv+R+w+F0hwQUGxP7mbgotQGBvp6HB/wxJ4mPziR2GCjQ1hxw71YNb3q9d+Nh+7rGeeysmFMhg+Bcl5919xMVgFKs6JyUuAw+CPjl8M2tYVnDVL8ANfj92zFYVkYxGDfjsJI97/wDawePX6GKpg= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=TWgBCXcB; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=qnjq/Jjl; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=xF0yksdK; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=sxi6wKgK DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB9C34BA9001 Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 257D81F7D6 for ; Sun, 27 Sep 2026 04:57:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1790485046; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fOGVQ06KOTvXszuqLbhS5AjcsTn8xJhteeAue8ouQFU=; b=TWgBCXcBj/FYZJr8Mkx0yPV7aWunj9yBf9fvqzZ9I1EV/zjd/TdCcFRd5op5yJW3oVGaeU zvUmi5vxHkpxnLeg7eaiuGsxDyUP0OpVIGOwc+gP42oG2rE+Fl/8cep1C0+85nwItDvUG7 HKjlU38+RJGNC8gdlgks7uRcioiEr5k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1790485046; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fOGVQ06KOTvXszuqLbhS5AjcsTn8xJhteeAue8ouQFU=; b=qnjq/JjluAYk5bXndRFRrwbK+1hNWqXCpCYOdkcngS5CdQIWIY/xwXcfhNPEHliYk/mkux 9wkAXPj1/zfaKOCw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1790485042; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fOGVQ06KOTvXszuqLbhS5AjcsTn8xJhteeAue8ouQFU=; b=xF0yksdKN3qNDWkQlGX+A6iJjR0qM/GCW0TfM1s3SGfmLv8/p7s4rC+HtvPUIel/muGe5u qf2gm4JFO4eKeKdR6C127W+/XuHXoyxkEuw4cp1DTWhsNGxy2dWYAVJSE6NQXG8ioL2nEW Ah56ZJ4wLffy6maSoSydyOUnebuOnQ0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1790485042; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fOGVQ06KOTvXszuqLbhS5AjcsTn8xJhteeAue8ouQFU=; b=sxi6wKgKNQuAyzeG2r/Smw+btoI1athIhHZZN+nNtH0pHELWOh3+Odg/9xHknZwaQuWsOR y88qji8tpC9PgrDg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B7B5E133F3 for ; Sun, 27 Sep 2026 04:57:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id tnQpGjGiuGpyegAAD6G6ig:T2 (envelope-from ) for ; Sun, 27 Sep 2026 04:57:21 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 1/2] [gdb/testsuite] Factor out gdb_test_kill Date: Sun, 27 Sep 2026 06:57:20 +0200 Message-ID: <20260927045721.1976335-2-tdevries@suse.de> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260927045721.1976335-1-tdevries@suse.de> References: <20260927045721.1976335-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-0.997]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[] 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 Replace all kill commands with "" or ".*" pattern and question/response: ... gdb_test "kill" "" "kill program" \ "Kill the program being debugged.*y or n. $" \ "y" ... with: ... gdb_test "with confirm off -- kill" "" "kill program" ... Factor out procs gdb_test_kill and inferior_killed_re and use for cases where the output of the kill command is matched more precisely. --- gdb/testsuite/gdb.base/attach-wait-input.exp | 6 ++--- gdb/testsuite/gdb.base/attach.exp | 8 +++--- gdb/testsuite/gdb.base/break-interp.exp | 2 +- gdb/testsuite/gdb.base/break.exp | 2 +- gdb/testsuite/gdb.base/catch-fork-kill.exp | 3 +-- gdb/testsuite/gdb.base/checkpoint.exp | 6 ++--- .../detach-in-breakpoint-commands.exp | 2 +- gdb/testsuite/gdb.base/hbreak2.exp | 3 +-- gdb/testsuite/gdb.base/hook-stop.exp | 2 +- gdb/testsuite/gdb.base/info-program.exp | 3 +-- gdb/testsuite/gdb.base/kill-after-signal.exp | 6 +---- gdb/testsuite/gdb.base/run-after-attach.exp | 4 +-- .../run-control-while-bg-execution.exp | 2 +- gdb/testsuite/gdb.base/sepdebug.exp | 2 +- gdb/testsuite/gdb.base/traced-thread.exp | 2 +- gdb/testsuite/gdb.base/valgrind-bt.exp | 2 +- gdb/testsuite/gdb.cp/mb-templates.exp | 3 +-- gdb/testsuite/gdb.guile/scm-value.exp | 4 +-- gdb/testsuite/gdb.multi/checkpoint-multi.exp | 11 +++----- gdb/testsuite/gdb.multi/multi-attach.exp | 4 +-- .../gdb.multi/pending-bp-del-inferior.exp | 3 +-- .../gdb.multi/watchpoint-multi-exit.exp | 3 +-- gdb/testsuite/gdb.python/py-value.exp | 4 +-- gdb/testsuite/gdb.reverse/break-precsave.exp | 4 +-- .../gdb.reverse/consecutive-precsave.exp | 4 +-- gdb/testsuite/gdb.reverse/finish-precsave.exp | 4 +-- gdb/testsuite/gdb.reverse/i386-precsave.exp | 4 +-- .../gdb.reverse/machinestate-precsave.exp | 4 +-- gdb/testsuite/gdb.reverse/sigall-precsave.exp | 4 +-- gdb/testsuite/gdb.reverse/solib-precsave.exp | 4 +-- gdb/testsuite/gdb.reverse/step-precsave.exp | 4 +-- gdb/testsuite/gdb.reverse/until-precsave.exp | 4 +-- gdb/testsuite/gdb.reverse/watch-precsave.exp | 4 +-- gdb/testsuite/gdb.server/ext-attach.exp | 2 +- gdb/testsuite/gdb.server/ext-restart.exp | 2 +- gdb/testsuite/gdb.server/ext-run.exp | 2 +- gdb/testsuite/gdb.server/ext-wrapper.exp | 2 +- .../gdb.server/extended-remote-restart.exp | 6 ++--- .../attach-many-short-lived-threads.exp | 2 +- .../infcall-from-bp-cond-simple.exp | 3 +-- gdb/testsuite/gdb.threads/kill.exp | 6 +---- .../gdb.threads/threads-after-exec.exp | 4 +-- gdb/testsuite/lib/gdb.exp | 26 +++++++++++++++++++ 43 files changed, 86 insertions(+), 96 deletions(-) diff --git a/gdb/testsuite/gdb.base/attach-wait-input.exp b/gdb/testsuite/gdb.base/attach-wait-input.exp index 68979b3c9f9..70751daf910 100644 --- a/gdb/testsuite/gdb.base/attach-wait-input.exp +++ b/gdb/testsuite/gdb.base/attach-wait-input.exp @@ -102,11 +102,9 @@ proc test { editing } { # As we've used attach, on quit, we'll detach from the # program. Explicitly kill it in case we failed above. - gdb_test "kill" \ + gdb_test "with confirm off -- kill" \ "" \ - "after attach, exit" \ - "Kill the program being debugged.*y or n. $" \ - "y" + "after attach, exit" } } diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp index e75dd662203..25fcf1c6ac5 100644 --- a/gdb/testsuite/gdb.base/attach.exp +++ b/gdb/testsuite/gdb.base/attach.exp @@ -186,7 +186,7 @@ proc_with_prefix do_attach_failure_tests {} { gdb_test_no_output "set confirm off" gdb_test "inferior 1" "Switching to inferior 1.*" "switch to inferior 1" - gdb_test "kill" "killed.*" "exit after attach failures" + gdb_test_kill "exit after attach failures" # This can probably be replaced with a call to runto or runto_main once # the kfail is removed. @@ -372,11 +372,9 @@ proc_with_prefix do_attach_tests {} { "attach when process' a.out not in cwd" set test "after attach3, exit" - gdb_test "kill" \ + gdb_test "with confirm off -- kill" \ "" \ - "$test" \ - "Kill the program being debugged.*y or n. $" \ - "y" + "$test" # Another "don't leave a process around" kill_wait_spawned_process $test_spawn_id diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp index 14094c72844..1a57b601fb5 100644 --- a/gdb/testsuite/gdb.base/break-interp.exp +++ b/gdb/testsuite/gdb.base/break-interp.exp @@ -463,7 +463,7 @@ proc test_ld {file ifmain trynosym displacement} { } # Try re-run if the new PIE displacement takes effect. - gdb_test "kill" "" "kill" {Kill the program being debugged\? \(y or n\) } "y" + gdb_test "with confirm off -- kill" "" "kill" reach $solib_bp "run" $displacement 2 gdb_test_no_output "set verbose off" diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp index 7ebce65bf4c..f578628a2c7 100644 --- a/gdb/testsuite/gdb.base/break.exp +++ b/gdb/testsuite/gdb.base/break.exp @@ -735,7 +735,7 @@ proc_with_prefix test_next_with_recursion {} { global decimal global binfile - gdb_test "kill" "" "kill program" "Kill the program being debugged.*y or n. $" "y" + gdb_test "with confirm off -- kill" "" "kill program" delete_breakpoints gdb_test "break factorial" "Breakpoint $decimal at .*" "break at factorial" diff --git a/gdb/testsuite/gdb.base/catch-fork-kill.exp b/gdb/testsuite/gdb.base/catch-fork-kill.exp index cd541e66247..c6ffb937ef0 100644 --- a/gdb/testsuite/gdb.base/catch-fork-kill.exp +++ b/gdb/testsuite/gdb.base/catch-fork-kill.exp @@ -84,8 +84,7 @@ proc do_test {fork_kind exit_kind} { gdb_test "break grandparent_done" "Breakpoint .*" gdb_test "continue" "hit Breakpoint .*, grandparent_done.*" } elseif {$exit_kind == "kill"} { - gdb_test "kill" "" "kill parent" \ - "Kill the program being debugged.*y or n. $" "y" + gdb_test "with confirm off -- kill" "" "kill parent" } else { perror "unreachable" } diff --git a/gdb/testsuite/gdb.base/checkpoint.exp b/gdb/testsuite/gdb.base/checkpoint.exp index 23686f8fcf0..9917628b22c 100644 --- a/gdb/testsuite/gdb.base/checkpoint.exp +++ b/gdb/testsuite/gdb.base/checkpoint.exp @@ -266,8 +266,7 @@ gdb_test "info checkpoints" " 1 .* 2 .* 3 .* 4 .* 5 .*" \ # Kill should now terminate all of them. # -gdb_test "kill" "" "kill all one" \ - "Kill the program being debugged.*y or n. $" "y" +gdb_test "with confirm off -- kill" "" "kill all one" # # and confirm that all are gone @@ -343,8 +342,7 @@ gdb_test_multiple "info checkpoints" $msg { # OK, kill 'em all... # -gdb_test "kill" "" "kill all one with many checkpoints" \ - "Kill the program being debugged.*y or n. $" "y" +gdb_test "with confirm off -- kill" "" "kill all one with many checkpoints" # # Finished: cleanup diff --git a/gdb/testsuite/gdb.base/detach-in-breakpoint-commands.exp b/gdb/testsuite/gdb.base/detach-in-breakpoint-commands.exp index b0487b58436..db4c4d8f01a 100644 --- a/gdb/testsuite/gdb.base/detach-in-breakpoint-commands.exp +++ b/gdb/testsuite/gdb.base/detach-in-breakpoint-commands.exp @@ -49,5 +49,5 @@ gdb_test \ "kill in commands" gdb_test "run" \ - [subst_vars {\[Inferior $decimal \([^\r\n]*\) killed\]}] \ + [inferior_killed_re] \ "run - kill" diff --git a/gdb/testsuite/gdb.base/hbreak2.exp b/gdb/testsuite/gdb.base/hbreak2.exp index f090aeefee9..10dc8e07e63 100644 --- a/gdb/testsuite/gdb.base/hbreak2.exp +++ b/gdb/testsuite/gdb.base/hbreak2.exp @@ -440,8 +440,7 @@ proc test_next_with_recursion {} { "Hardware assisted breakpoint $decimal at .*" \ "hardware break at factorial" - gdb_test "kill" "" "kill program" \ - "Kill the program being debugged.*y or n. $" "y" + gdb_test "with confirm off -- kill" "" "kill program" # Run until we call factorial with 6 diff --git a/gdb/testsuite/gdb.base/hook-stop.exp b/gdb/testsuite/gdb.base/hook-stop.exp index 27016db3c87..7a08216347d 100644 --- a/gdb/testsuite/gdb.base/hook-stop.exp +++ b/gdb/testsuite/gdb.base/hook-stop.exp @@ -87,7 +87,7 @@ proc hook_stop_kill {} { set test "run hook-stop" gdb_test_multiple "continue" "$test" { - -re "Continuing.*\r\n\\\[Inferior $decimal \\(.*\\) killed\\\]\r\n${gdb_prompt} $" { + -re "Continuing.*\r\n[inferior_killed_re]\r\n${gdb_prompt} $" { pass $test } } diff --git a/gdb/testsuite/gdb.base/info-program.exp b/gdb/testsuite/gdb.base/info-program.exp index 3b6e7a2afb8..79ab8b89224 100644 --- a/gdb/testsuite/gdb.base/info-program.exp +++ b/gdb/testsuite/gdb.base/info-program.exp @@ -95,8 +95,7 @@ proc do_test { threads non-stop } { } } - gdb_test "kill" "" "kill program" \ - "Kill the program being debugged.*y or n. $" "y" + gdb_test "with confirm off -- kill" "" "kill program" gdb_test "info program" "The program being debugged is not being run." \ "info program, after kill" diff --git a/gdb/testsuite/gdb.base/kill-after-signal.exp b/gdb/testsuite/gdb.base/kill-after-signal.exp index f55aa8b81f3..330faab3ce2 100644 --- a/gdb/testsuite/gdb.base/kill-after-signal.exp +++ b/gdb/testsuite/gdb.base/kill-after-signal.exp @@ -65,8 +65,4 @@ gdb_test_multiple "stepi" $test { } } -gdb_test_multiple "kill" "kill" { - -re "Kill the program being debugged\\? \\(y or n\\) $" { - gdb_test "y" "\\\[Inferior $decimal \\(.*\\) killed\\\]" "kill" - } -} +gdb_test_kill "kill" diff --git a/gdb/testsuite/gdb.base/run-after-attach.exp b/gdb/testsuite/gdb.base/run-after-attach.exp index 256f2fbcdd1..a577b96649d 100644 --- a/gdb/testsuite/gdb.base/run-after-attach.exp +++ b/gdb/testsuite/gdb.base/run-after-attach.exp @@ -31,9 +31,7 @@ set test_pid [spawn_id_get_pid $test_spawn_id] set test "attach to process" gdb_test "attach $test_pid" "Attaching to program.*" $test -set test "kill process" -gdb_test "kill" "" $test \ - "Kill the program being debugged.*y or n. $" "y" +gdb_test "with confirm off -- kill" "" "kill process" set test "restart process" gdb_test "start" "Starting program.*Temporary breakpoint .*" $test diff --git a/gdb/testsuite/gdb.base/run-control-while-bg-execution.exp b/gdb/testsuite/gdb.base/run-control-while-bg-execution.exp index 0bdf95256dd..91e66f0b988 100644 --- a/gdb/testsuite/gdb.base/run-control-while-bg-execution.exp +++ b/gdb/testsuite/gdb.base/run-control-while-bg-execution.exp @@ -69,7 +69,7 @@ proc do_test { action1 action2 } { gdb_test -no-prompt-anchor "continue &" if { $action1 == "kill" } { - gdb_test "kill" "Inferior 1 .* killed.*" + gdb_test_kill "kill" 1 } elseif { $action1 == "detach" } { set child_pid [get_integer_valueof "mypid" -1] if { $child_pid == -1 } { diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp index 1ada019ea43..faf072415db 100644 --- a/gdb/testsuite/gdb.base/sepdebug.exp +++ b/gdb/testsuite/gdb.base/sepdebug.exp @@ -483,7 +483,7 @@ proc test_next_with_recursion {} { global decimal global binfile - gdb_test "kill" "" "kill program" "Kill the program being debugged.*y or n. $" "y" + gdb_test "with confirm off -- kill" "" "kill program" delete_breakpoints gdb_test "break factorial" "Breakpoint $decimal at .*" "break at factorial" diff --git a/gdb/testsuite/gdb.base/traced-thread.exp b/gdb/testsuite/gdb.base/traced-thread.exp index 219e3f900ac..4ca589ff942 100644 --- a/gdb/testsuite/gdb.base/traced-thread.exp +++ b/gdb/testsuite/gdb.base/traced-thread.exp @@ -47,7 +47,7 @@ gdb_test "attach $child_pid" \ # Now kill the parent process, ending the trace. gdb_test "inferior 1" "Switching to inferior 1.*" "switch to inferior 1" -gdb_test "kill" ".*" "kill the parent process" +gdb_test "with confirm off -- kill" ".*" "kill the parent process" # Kill the child process as well. Use the shell to avoid funny # business with gdbserver testing. diff --git a/gdb/testsuite/gdb.base/valgrind-bt.exp b/gdb/testsuite/gdb.base/valgrind-bt.exp index 2fd29e72508..29ba72a0261 100644 --- a/gdb/testsuite/gdb.base/valgrind-bt.exp +++ b/gdb/testsuite/gdb.base/valgrind-bt.exp @@ -62,6 +62,6 @@ gdb_test_no_output "set width 0" gdb_test "bt" "#\[0-9 ]+main \\(.*\\) at .*${srcfile}.*" # Explicitly kill the program so it doesn't dump core when we quit->detach. -gdb_test "kill" "" "kill program" "Kill the program being debugged.*y or n. $" "y" +gdb_test "with confirm off -- kill" "" "kill program" vgdb_stop diff --git a/gdb/testsuite/gdb.cp/mb-templates.exp b/gdb/testsuite/gdb.cp/mb-templates.exp index a1d55d3246f..0e7d79ebfc1 100644 --- a/gdb/testsuite/gdb.cp/mb-templates.exp +++ b/gdb/testsuite/gdb.cp/mb-templates.exp @@ -52,8 +52,7 @@ gdb_test "continue" \ # Separately set the condition. delete_breakpoints -gdb_test "kill" "" "kill" \ - {Kill the program being debugged\? \(y or n\) } "y" +gdb_test "with confirm off -- kill" "" "kill" gdb_test "break $srcfile:$bp_location" \ "Breakpoint.*at.*: $srcfile:$bp_location. \\(2 locations\\).*" \ diff --git a/gdb/testsuite/gdb.guile/scm-value.exp b/gdb/testsuite/gdb.guile/scm-value.exp index fab1c300042..3c467404e80 100644 --- a/gdb/testsuite/gdb.guile/scm-value.exp +++ b/gdb/testsuite/gdb.guile/scm-value.exp @@ -279,9 +279,7 @@ proc test_value_after_death {} { "create PTR type" # Kill the inferior and remove the symbols. - gdb_test "kill" "" "kill the inferior" \ - "Kill the program being debugged. .y or n. $" \ - "y" + gdb_test "with confirm off -- kill" "" "kill the inferior" gdb_test "file" "" "discard the symbols" \ "Discard symbol table from.*y or n. $" \ "y" diff --git a/gdb/testsuite/gdb.multi/checkpoint-multi.exp b/gdb/testsuite/gdb.multi/checkpoint-multi.exp index b847d06b5e0..ac9890682c1 100644 --- a/gdb/testsuite/gdb.multi/checkpoint-multi.exp +++ b/gdb/testsuite/gdb.multi/checkpoint-multi.exp @@ -153,8 +153,7 @@ with_test_prefix "check detach on non-checkpointed inferior" { with_test_prefix "check kill on non-checkpointed inferior" { start_2_inferiors_checkpoint_on_inf_2 - gdb_test "kill" "" "kill non-checkpointed inferior" \ - "Kill the program being debugged.*y or n. $" "y" + gdb_test "with confirm off -- kill" "" "kill non-checkpointed inferior" } with_test_prefix "check restart 0 on non-checkpointed inferior" { @@ -419,9 +418,7 @@ with_test_prefix "two inferiors with checkpoints" { } with_test_prefix "kill inferior 1" { - gdb_test "kill" "\\\[Inferior 1 \\(process $::decimal\\) killed\\\]" \ - "kill inferior 1" \ - "Kill the program being debugged.*y or n. $" "y" + gdb_test_kill "kill inferior 1" 1 "process $decimal" gdb_test "info checkpoints" \ [multi_line \ @@ -559,9 +556,7 @@ with_test_prefix "three inferiors with checkpoints" { } with_test_prefix "kill inferior 3" { - gdb_test "kill" "\\\[Inferior 3 \\(process $::decimal\\) killed\\\]" \ - "kill inferior 3" \ - "Kill the program being debugged.*y or n. $" "y" + gdb_test_kill "kill inferior 3" 3 "process $decimal" gdb_test "info checkpoints" \ [multi_line \ diff --git a/gdb/testsuite/gdb.multi/multi-attach.exp b/gdb/testsuite/gdb.multi/multi-attach.exp index 03a30446129..c0e631a87d2 100644 --- a/gdb/testsuite/gdb.multi/multi-attach.exp +++ b/gdb/testsuite/gdb.multi/multi-attach.exp @@ -51,9 +51,9 @@ gdb_test "attach $testpid2" \ "attach to program 2" gdb_test "backtrace" ".*main.*" "backtrace 2" -gdb_test "kill" "" "kill inferior 2" "Kill the program being debugged. .y or n. " "y" +gdb_test "with confirm off -- kill" "" "kill inferior 2" gdb_test "inferior 1" ".*Switching to inferior 1.*" -gdb_test "kill" "" "kill inferior 1" "Kill the program being debugged. .y or n. " "y" +gdb_test "with confirm off -- kill" "" "kill inferior 1" kill_wait_spawned_process $test_spawn_id1 kill_wait_spawned_process $test_spawn_id2 diff --git a/gdb/testsuite/gdb.multi/pending-bp-del-inferior.exp b/gdb/testsuite/gdb.multi/pending-bp-del-inferior.exp index 26b1bc14830..84d967cca8c 100644 --- a/gdb/testsuite/gdb.multi/pending-bp-del-inferior.exp +++ b/gdb/testsuite/gdb.multi/pending-bp-del-inferior.exp @@ -67,8 +67,7 @@ proc test_setup {} { # Assuming inferior 2 is already selected, kill the current inferior # (inferior 2), select inferior 1, and then remove inferior 2. proc kill_and_remove_inferior_2 {} { - gdb_test "kill" "" "kill inferior 2" \ - "Kill the program being debugged.*y or n. $" "y" + gdb_test "with confirm off -- kill" "" "kill inferior 2" gdb_test "inferior 1" "Switching to inferior 1 .*" \ "select inferior 1" diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp b/gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp index 2283d5926aa..ddb511962ef 100644 --- a/gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp +++ b/gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp @@ -46,8 +46,7 @@ proc do_test {dispose} { # Dispose of the inferior. This should get rid of this inferior's # watchpoint locations. if {$dispose == "kill"} { - gdb_test "kill" "" "kill inferior 2" \ - "Kill the program being debugged.*y or n. $" "y" + gdb_test "with confirm off -- kill" "" "kill inferior 2" } elseif {$dispose == "detach"} { gdb_test "detach" ".*" "detach inferior 2" } elseif {$dispose == "exit"} { diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp index ff658465897..f99b46ee101 100644 --- a/gdb/testsuite/gdb.python/py-value.exp +++ b/gdb/testsuite/gdb.python/py-value.exp @@ -404,9 +404,7 @@ proc test_value_after_death {} { "create PTR type" 1 # Kill the inferior and remove the symbols. - gdb_test "kill" "" "kill the inferior" \ - "Kill the program being debugged. .y or n. $" \ - "y" + gdb_test "with confirm off -- kill" "" "kill the inferior" gdb_test "file" "" "discard the symbols" \ "Discard symbol table from.*y or n. $" \ "y" diff --git a/gdb/testsuite/gdb.reverse/break-precsave.exp b/gdb/testsuite/gdb.reverse/break-precsave.exp index 994457d4439..6a977ce77c5 100644 --- a/gdb/testsuite/gdb.reverse/break-precsave.exp +++ b/gdb/testsuite/gdb.reverse/break-precsave.exp @@ -50,8 +50,8 @@ proc precsave_tests {} { "Saved core file $precsave with execution log\." \ "save process recfile" - gdb_test "kill" "" "kill process, prepare to debug log file" \ - "Kill the program being debugged\\? \\(y or n\\) " "y" + gdb_test "with confirm off -- kill" "" \ + "kill process, prepare to debug log file" gdb_test "record restore $precsave" \ "Restored records from core file .*" \ diff --git a/gdb/testsuite/gdb.reverse/consecutive-precsave.exp b/gdb/testsuite/gdb.reverse/consecutive-precsave.exp index 9a9132d9a4f..ad271e3e13d 100644 --- a/gdb/testsuite/gdb.reverse/consecutive-precsave.exp +++ b/gdb/testsuite/gdb.reverse/consecutive-precsave.exp @@ -44,8 +44,8 @@ gdb_test "record save $precsave" \ "Saved core file $precsave with execution log\." \ "save process recfile" -gdb_test "kill" "" "kill process, prepare to debug log file" \ - "Kill the program being debugged\\? \\(y or n\\) " "y" +gdb_test "with confirm off -- kill" "" \ + "kill process, prepare to debug log file" gdb_test "record restore $precsave" \ "Restored records from core file .*" \ diff --git a/gdb/testsuite/gdb.reverse/finish-precsave.exp b/gdb/testsuite/gdb.reverse/finish-precsave.exp index 00c7d8caa41..c5aa63ad94b 100644 --- a/gdb/testsuite/gdb.reverse/finish-precsave.exp +++ b/gdb/testsuite/gdb.reverse/finish-precsave.exp @@ -45,8 +45,8 @@ gdb_test "record save $precsave" \ "Saved core file $precsave with execution log\." \ "save process recfile" -gdb_test "kill" "" "kill process, prepare to debug log file" \ - "Kill the program being debugged\\? \\(y or n\\) " "y" +gdb_test "with confirm off -- kill" "" \ + "kill process, prepare to debug log file" gdb_test "record restore $precsave" \ "Restored records from core file .*" \ diff --git a/gdb/testsuite/gdb.reverse/i386-precsave.exp b/gdb/testsuite/gdb.reverse/i386-precsave.exp index 8f6ad2283c0..2b93ee432a0 100644 --- a/gdb/testsuite/gdb.reverse/i386-precsave.exp +++ b/gdb/testsuite/gdb.reverse/i386-precsave.exp @@ -52,8 +52,8 @@ gdb_test "record save $precsave" \ "Saved core file $precsave with execution log\." \ "save process recfile" -gdb_test "kill" "" "kill process, prepare to debug log file" \ - "Kill the program being debugged\\? \\(y or n\\) " "y" +gdb_test "with confirm off -- kill" "" \ + "kill process, prepare to debug log file" gdb_test "record restore $precsave" \ "Restored records from core file .*" \ diff --git a/gdb/testsuite/gdb.reverse/machinestate-precsave.exp b/gdb/testsuite/gdb.reverse/machinestate-precsave.exp index 8a11c6d24b9..f81ca0f08bb 100644 --- a/gdb/testsuite/gdb.reverse/machinestate-precsave.exp +++ b/gdb/testsuite/gdb.reverse/machinestate-precsave.exp @@ -68,8 +68,8 @@ gdb_test "record save $precsave" \ "Saved core file $precsave with execution log\." \ "save process recfile" -gdb_test "kill" "" "kill process, prepare to debug log file" \ - "Kill the program being debugged\\? \\(y or n\\) " "y" +gdb_test "with confirm off -- kill" "" \ + "kill process, prepare to debug log file" gdb_test "record restore $precsave" \ "Restored records from core file .*" \ diff --git a/gdb/testsuite/gdb.reverse/sigall-precsave.exp b/gdb/testsuite/gdb.reverse/sigall-precsave.exp index 5ce7de0ea1f..25f03a102c0 100644 --- a/gdb/testsuite/gdb.reverse/sigall-precsave.exp +++ b/gdb/testsuite/gdb.reverse/sigall-precsave.exp @@ -268,8 +268,8 @@ gdb_test "record save $precsave" \ "Saved core file $precsave with execution log\." \ "save process recfile" -gdb_test "kill" "" "kill process, prepare to debug log file" \ - "Kill the program being debugged\\? \\(y or n\\) " "y" +gdb_test "with confirm off -- kill" "" \ + "kill process, prepare to debug log file" gdb_test "record restore $precsave" \ "Restored records from core file .*" \ diff --git a/gdb/testsuite/gdb.reverse/solib-precsave.exp b/gdb/testsuite/gdb.reverse/solib-precsave.exp index cad30320048..98c50a98e63 100644 --- a/gdb/testsuite/gdb.reverse/solib-precsave.exp +++ b/gdb/testsuite/gdb.reverse/solib-precsave.exp @@ -88,8 +88,8 @@ gdb_test "record save $precsave" \ "Saved core file $precsave with execution log\." \ "save process recfile" -gdb_test "kill" "" "kill process, prepare to debug log file" \ - "Kill the program being debugged\\? \\(y or n\\) " "y" +gdb_test "with confirm off -- kill" "" \ + "kill process, prepare to debug log file" gdb_test "record restore $precsave" \ "Restored records from core file .*" \ diff --git a/gdb/testsuite/gdb.reverse/step-precsave.exp b/gdb/testsuite/gdb.reverse/step-precsave.exp index 76171343677..0fa45e82890 100644 --- a/gdb/testsuite/gdb.reverse/step-precsave.exp +++ b/gdb/testsuite/gdb.reverse/step-precsave.exp @@ -66,8 +66,8 @@ with_timeout_factor 10 { "save process recfile" } -gdb_test "kill" "" "kill process, prepare to debug log file" \ - "Kill the program being debugged\\? \\(y or n\\) " "y" +gdb_test "with confirm off -- kill" "" \ + "kill process, prepare to debug log file" clean_restart ${::testfile} diff --git a/gdb/testsuite/gdb.reverse/until-precsave.exp b/gdb/testsuite/gdb.reverse/until-precsave.exp index 075a87dc2d8..d3df71f6953 100644 --- a/gdb/testsuite/gdb.reverse/until-precsave.exp +++ b/gdb/testsuite/gdb.reverse/until-precsave.exp @@ -65,8 +65,8 @@ with_timeout_factor 10 { "save process recfile" } -gdb_test "kill" "" "kill process, prepare to debug log file" \ - "Kill the program being debugged\\? \\(y or n\\) " "y" +gdb_test "with confirm off -- kill" "" \ + "kill process, prepare to debug log file" gdb_test "record restore $precsave" \ "Restored records from core file .*" \ diff --git a/gdb/testsuite/gdb.reverse/watch-precsave.exp b/gdb/testsuite/gdb.reverse/watch-precsave.exp index 474012f74c7..bc7bdb72f66 100644 --- a/gdb/testsuite/gdb.reverse/watch-precsave.exp +++ b/gdb/testsuite/gdb.reverse/watch-precsave.exp @@ -43,8 +43,8 @@ gdb_test "record save $precsave" \ "Saved core file $precsave with execution log\." \ "save process recfile" -gdb_test "kill" "" "kill process, prepare to debug log file" \ - "Kill the program being debugged\\? \\(y or n\\) " "y" +gdb_test "with confirm off -- kill" "" \ + "kill process, prepare to debug log file" gdb_test "record restore $precsave" \ "Restored records from core file .*" \ diff --git a/gdb/testsuite/gdb.server/ext-attach.exp b/gdb/testsuite/gdb.server/ext-attach.exp index cb4c1277228..204e521216d 100644 --- a/gdb/testsuite/gdb.server/ext-attach.exp +++ b/gdb/testsuite/gdb.server/ext-attach.exp @@ -87,7 +87,7 @@ proc run_test { target_async target_non_stop to_disable } { "attach to remote program 2" gdb_test "backtrace" ".*main.*" "backtrace 2" - gdb_test "kill" "" "kill" "Kill the program being debugged. .y or n. " "y" + gdb_test "with confirm off -- kill" "" "kill" gdb_test_no_output "monitor exit" kill_wait_spawned_process $test_spawn_id diff --git a/gdb/testsuite/gdb.server/ext-restart.exp b/gdb/testsuite/gdb.server/ext-restart.exp index 031aaeb5db8..dd4bd710d89 100644 --- a/gdb/testsuite/gdb.server/ext-restart.exp +++ b/gdb/testsuite/gdb.server/ext-restart.exp @@ -69,6 +69,6 @@ with_test_prefix "restart" { } } -gdb_test "kill" "" "kill" "Kill the program being debugged. .y or n. " "y" +gdb_test "with confirm off -- kill" "" "kill" gdb_test_no_output "monitor exit" diff --git a/gdb/testsuite/gdb.server/ext-run.exp b/gdb/testsuite/gdb.server/ext-run.exp index 4fb2fe004f2..664b8c74bf0 100644 --- a/gdb/testsuite/gdb.server/ext-run.exp +++ b/gdb/testsuite/gdb.server/ext-run.exp @@ -145,7 +145,7 @@ proc do_test { clear_sysroot set_remote_exec fetch_exec_and_args } { } } - gdb_test "kill" "" "kill" "Kill the program being debugged. .y or n. " "y" + gdb_test "with confirm off -- kill" "" "kill" gdb_load $::binfile gdb_test "monitor help" "The following monitor commands.*" \ diff --git a/gdb/testsuite/gdb.server/ext-wrapper.exp b/gdb/testsuite/gdb.server/ext-wrapper.exp index 757127b1548..0986bd9197a 100644 --- a/gdb/testsuite/gdb.server/ext-wrapper.exp +++ b/gdb/testsuite/gdb.server/ext-wrapper.exp @@ -74,6 +74,6 @@ with_test_prefix "restart" { gdb_test "print d" "${::valnum_re} = ${hex} \"1\".*" } -gdb_test "kill" "" "kill" "Kill the program being debugged. .y or n. " "y" +gdb_test "with confirm off -- kill" "" "kill" gdb_test_no_output "monitor exit" diff --git a/gdb/testsuite/gdb.server/extended-remote-restart.exp b/gdb/testsuite/gdb.server/extended-remote-restart.exp index a592dba79ed..df0202c5157 100644 --- a/gdb/testsuite/gdb.server/extended-remote-restart.exp +++ b/gdb/testsuite/gdb.server/extended-remote-restart.exp @@ -101,11 +101,9 @@ proc test_reload { do_kill_p follow_child_p } { if { $do_kill_p } { # (Optional) Kill one of the inferiors. - gdb_test "kill" \ + gdb_test "with confirm off -- kill" \ "" \ - "Kill inferior" \ - "Kill the program being debugged.*y or n. $" \ - "y" + "Kill inferior" # Check the first inferior really did die. gdb_test "info inferiors" \ diff --git a/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp b/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp index 6f51e607d77..a69034e961c 100644 --- a/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp +++ b/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp @@ -178,7 +178,7 @@ proc test {} { gdb_test "detach" "Detaching from.*" } else { - gdb_test "kill" "" "kill process" "Kill the program being debugged.*y or n. $" "y" + gdb_test "with confirm off -- kill" "" "kill process" } gdb_test_no_output "set breakpoint always-inserted off" diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp index bce53c39196..a2843dd5765 100644 --- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp +++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp @@ -133,8 +133,7 @@ proc_with_prefix run_kill_and_restart_test { target_async target_non_stop } { gdb_continue_to_breakpoint "worker_func" # Now kill the program being debugged. - gdb_test "kill" "" "kill process" \ - "Kill the program being debugged.*y or n. $" "y" + gdb_test "with confirm off -- kill" "" "kill process" # Check we can restart the inferior. At one point this would trigger an # assertion. diff --git a/gdb/testsuite/gdb.threads/kill.exp b/gdb/testsuite/gdb.threads/kill.exp index 84ab6cd561c..de22e3e46f6 100644 --- a/gdb/testsuite/gdb.threads/kill.exp +++ b/gdb/testsuite/gdb.threads/kill.exp @@ -67,11 +67,7 @@ proc test {threaded} { # # the above would mean that the remote end crashed. - gdb_test_multiple "kill" "kill" { - -re "Kill the program being debugged\\? \\(y or n\\) $" { - gdb_test "y" "\\\[Inferior $decimal \\(.*\\) killed\\\]" "kill" - } - } + gdb_test_kill "kill" } } diff --git a/gdb/testsuite/gdb.threads/threads-after-exec.exp b/gdb/testsuite/gdb.threads/threads-after-exec.exp index fd8550d3e99..8cc50970009 100644 --- a/gdb/testsuite/gdb.threads/threads-after-exec.exp +++ b/gdb/testsuite/gdb.threads/threads-after-exec.exp @@ -53,9 +53,7 @@ proc do_test { } { # on native Linux as GDB did not dispose of the pre-exec LWP for # the non-leader (and that LWP did not have a matching thread in # the core thread list). - gdb_test "with confirm off -- kill" \ - "\\\[Inferior 1 (.*) killed\\\]" \ - "kill inferior" + gdb_test_kill "kill inferior" 1 } do_test diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 9ade9a16818..07c0ca1bcf2 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -365,6 +365,22 @@ set octal {(?:[0-7]+)} set inferior_exited_re "(?:\\\[Inferior ${::decimal} \\(\[^\n\r\]*\\) exited)" +# Match gdb output for the kill command. The match can be made more specific +# using INFERIOR_RE and PROCESS_RE. +proc inferior_killed_re {{inferior_re ""} {process_re ""}} { + if {$inferior_re == ""} { + set inferior_re $::decimal + } + if {$process_re == ""} { + # A target-specific string, like "process n", "process n, thread t" or + # "target remote". Because it's target-specific, match anything. + set process_re {[^\r\n]+} + } + return \ + [subst_vars \ + {\[Inferior (?:$inferior_re) \((?:$process_re)\) killed\]}] +} + # A regular expression that matches the first word of a thread # description after the thread number info 'info threads' set tdlabel_re "(process|Thread|LWP)" @@ -7869,6 +7885,16 @@ proc kill_wait_spawned_process { proc_spawn_id } { clean_up_spawn_id target $proc_spawn_id } +# Kill the current inferior with MESSAGE. If INFERIOR_RE/PROCESS_RE is +# non-empty, check that the killed inferior matches. + +proc gdb_test_kill {message {inferior_re ""} {process_re ""}} { + gdb_test \ + "with confirm off -- kill" \ + [inferior_killed_re $inferior_re $process_re] \ + $message +} + # Returns the process id corresponding to the given spawn id. proc spawn_id_get_pid { spawn_id } { -- 2.51.0