From patchwork Wed Jan 25 22:46:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 63724 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AFDCF3888C7F for ; Wed, 25 Jan 2023 22:50:47 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from qproxy4-pub.mail.unifiedlayer.com (qproxy4-pub.mail.unifiedlayer.com [66.147.248.250]) by sourceware.org (Postfix) with ESMTPS id 5E124388C03D for ; Wed, 25 Jan 2023 22:47:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5E124388C03D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from outbound-ss-761.bluehost.com (outbound-ss-761.bluehost.com [74.220.211.250]) by qproxy4.mail.unifiedlayer.com (Postfix) with ESMTP id 9B9798025BE4 for ; Wed, 25 Jan 2023 22:47:35 +0000 (UTC) Received: from cmgw10.mail.unifiedlayer.com (unknown [10.0.90.125]) by progateway8.mail.pro1.eigbox.com (Postfix) with ESMTP id 92EBA100411D8 for ; Wed, 25 Jan 2023 22:46:35 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id KoXLpG4fznkPJKoXLpFWpi; Wed, 25 Jan 2023 22:46:35 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=f86NuM+M c=1 sm=1 tr=0 ts=63d1b14b a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=RvmDmJFTN0MA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=Gf3JCjH49PolRZrNb74A:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: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=YeRxRiv231PJb5kSmwEPRpaQq0Qn6+yvh91pDyY50aM=; b=NCkCe6YpW+Y8BNxJhl1oOJKhlj RyBLpEPLZMVgsIJrEVlj9CvM9vdp2URFimn3vu5cP5Jr9w3OoZAB/WUFqVqsMMfaCdnXx3Bauxrn3 KhxqWNAdPI3r0BjZlSmSpCnoX; Received: from 97-122-76-186.hlrn.qwest.net ([97.122.76.186]:53060 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pKoXL-000gfc-7x; Wed, 25 Jan 2023 15:46:35 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 16/27] Use clean_restart in gdb.arch Date: Wed, 25 Jan 2023 15:46:03 -0700 Message-Id: <20230125224614.1006886-17-tom@tromey.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230125224614.1006886-1-tom@tromey.com> References: <20230125224614.1006886-1-tom@tromey.com> MIME-Version: 1.0 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.76.186 X-Source-L: No X-Exim-ID: 1pKoXL-000gfc-7x X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-76-186.hlrn.qwest.net (localhost.localdomain) [97.122.76.186]:53060 X-Source-Auth: tom+tromey.com X-Email-Count: 26 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3027.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Change gdb.arch to use clean_restart more consistently. --- gdb/testsuite/gdb.arch/alpha-step.exp | 5 +---- gdb/testsuite/gdb.arch/altivec-abi.exp | 5 +---- gdb/testsuite/gdb.arch/e500-prologue.exp | 5 +---- gdb/testsuite/gdb.arch/e500-regs.exp | 5 +---- gdb/testsuite/gdb.arch/gdb1291.exp | 5 +---- gdb/testsuite/gdb.arch/gdb1431.exp | 5 +---- gdb/testsuite/gdb.arch/gdb1558.exp | 5 +---- gdb/testsuite/gdb.arch/i386-bp_permanent.exp | 5 +---- gdb/testsuite/gdb.arch/i386-gnu-cfi.exp | 5 +---- gdb/testsuite/gdb.arch/i386-prologue.exp | 5 +---- gdb/testsuite/gdb.arch/i386-signal.exp | 5 +---- gdb/testsuite/gdb.arch/i386-size-overlap.exp | 5 +---- gdb/testsuite/gdb.arch/i386-size.exp | 5 +---- gdb/testsuite/gdb.arch/i386-unwind.exp | 5 +---- gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp | 5 +---- gdb/testsuite/gdb.arch/mips-octeon-bbit.exp | 5 +---- gdb/testsuite/gdb.arch/pa-nullify.exp | 5 +---- gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp | 5 +---- gdb/testsuite/gdb.arch/powerpc-d128-regs.exp | 7 +------ gdb/testsuite/gdb.arch/powerpc-prologue.exp | 5 +---- gdb/testsuite/gdb.arch/ppc-dfp.exp | 7 +------ gdb/testsuite/gdb.arch/ppc-fp.exp | 7 +------ gdb/testsuite/gdb.arch/pr25124.exp | 7 +------ gdb/testsuite/gdb.arch/s390-multiarch.exp | 5 +---- gdb/testsuite/gdb.arch/thumb-prologue.exp | 5 +---- gdb/testsuite/gdb.arch/thumb2-it.exp | 5 +---- gdb/testsuite/gdb.arch/vsx-regs.exp | 5 +---- 27 files changed, 27 insertions(+), 116 deletions(-) diff --git a/gdb/testsuite/gdb.arch/alpha-step.exp b/gdb/testsuite/gdb.arch/alpha-step.exp index 07b4c3912d9..f17210ba5d6 100644 --- a/gdb/testsuite/gdb.arch/alpha-step.exp +++ b/gdb/testsuite/gdb.arch/alpha-step.exp @@ -25,10 +25,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] ! return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile proc test_stepi {function } { # Restart the program from scratch. If GDB got confused during one diff --git a/gdb/testsuite/gdb.arch/altivec-abi.exp b/gdb/testsuite/gdb.arch/altivec-abi.exp index b04858950e8..8417c8828e7 100644 --- a/gdb/testsuite/gdb.arch/altivec-abi.exp +++ b/gdb/testsuite/gdb.arch/altivec-abi.exp @@ -47,10 +47,7 @@ proc altivec_abi_tests { extra_flags force_abi } { } } - gdb_exit - gdb_start - gdb_reinitialize_dir $srcdir/$subdir - gdb_load ${binfile} + clean_restart $binfile # Run to `main' where we begin our tests. if {![runto_main]} { diff --git a/gdb/testsuite/gdb.arch/e500-prologue.exp b/gdb/testsuite/gdb.arch/e500-prologue.exp index 7c32d9dd5b0..82898d98aa9 100644 --- a/gdb/testsuite/gdb.arch/e500-prologue.exp +++ b/gdb/testsuite/gdb.arch/e500-prologue.exp @@ -27,10 +27,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] ! return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile # Insert a breakpoint in FUNCTION and verifies that the breakpoint was # inserted at the expected location. EXPECTED_LOCATION should be an diff --git a/gdb/testsuite/gdb.arch/e500-regs.exp b/gdb/testsuite/gdb.arch/e500-regs.exp index 615b745d251..ac196ff4722 100644 --- a/gdb/testsuite/gdb.arch/e500-regs.exp +++ b/gdb/testsuite/gdb.arch/e500-regs.exp @@ -136,10 +136,7 @@ gdb_expect_list "info vector" ".*$gdb_prompt $" { # We must restart everything, because we have set important registers to # some unusual values. -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.arch/gdb1291.exp b/gdb/testsuite/gdb.arch/gdb1291.exp index a81a13ff151..56119ab1e29 100644 --- a/gdb/testsuite/gdb.arch/gdb1291.exp +++ b/gdb/testsuite/gdb.arch/gdb1291.exp @@ -33,10 +33,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ""] ! return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile # # Run to `main' where we begin our tests. diff --git a/gdb/testsuite/gdb.arch/gdb1431.exp b/gdb/testsuite/gdb.arch/gdb1431.exp index eee14fb3025..ab59aa87522 100644 --- a/gdb/testsuite/gdb.arch/gdb1431.exp +++ b/gdb/testsuite/gdb.arch/gdb1431.exp @@ -35,10 +35,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ""] ! return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile # # Run to `main' where we begin our tests. diff --git a/gdb/testsuite/gdb.arch/gdb1558.exp b/gdb/testsuite/gdb.arch/gdb1558.exp index 9090f03d6d9..76ae9c9a0a3 100644 --- a/gdb/testsuite/gdb.arch/gdb1558.exp +++ b/gdb/testsuite/gdb.arch/gdb1558.exp @@ -32,10 +32,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {"add return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile gdb_test "b -q main" "Breakpoint 1.*" "set breakpoint at main" gdb_test "b -q sub1" "Breakpoint 2.*" "set breakpoint at sub1" diff --git a/gdb/testsuite/gdb.arch/i386-bp_permanent.exp b/gdb/testsuite/gdb.arch/i386-bp_permanent.exp index d75ea648148..c56f31366c5 100644 --- a/gdb/testsuite/gdb.arch/i386-bp_permanent.exp +++ b/gdb/testsuite/gdb.arch/i386-bp_permanent.exp @@ -33,10 +33,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile # # Run to `main' where we begin our tests. diff --git a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp index 56a4eee32a6..d34bc81a299 100644 --- a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp +++ b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp @@ -40,10 +40,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfilec} ${srcdir}/${subdir}/${srcfile # Get things started. -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile # We should stop in abort(3). diff --git a/gdb/testsuite/gdb.arch/i386-prologue.exp b/gdb/testsuite/gdb.arch/i386-prologue.exp index 8e24b879fd1..d5fa4421dbe 100644 --- a/gdb/testsuite/gdb.arch/i386-prologue.exp +++ b/gdb/testsuite/gdb.arch/i386-prologue.exp @@ -53,10 +53,7 @@ proc skip_breakpoint { msg } { } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile # # Run to `main' where we begin our tests. diff --git a/gdb/testsuite/gdb.arch/i386-signal.exp b/gdb/testsuite/gdb.arch/i386-signal.exp index 17c6467076c..f6a88719a40 100644 --- a/gdb/testsuite/gdb.arch/i386-signal.exp +++ b/gdb/testsuite/gdb.arch/i386-signal.exp @@ -25,10 +25,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile runto func gdb_test "backtrace 10" \ diff --git a/gdb/testsuite/gdb.arch/i386-size-overlap.exp b/gdb/testsuite/gdb.arch/i386-size-overlap.exp index a5517b836f3..8da15f25c18 100644 --- a/gdb/testsuite/gdb.arch/i386-size-overlap.exp +++ b/gdb/testsuite/gdb.arch/i386-size-overlap.exp @@ -30,10 +30,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile # We use gdb_run_cmd so this stands a chance to work for remote # targets too. diff --git a/gdb/testsuite/gdb.arch/i386-size.exp b/gdb/testsuite/gdb.arch/i386-size.exp index 0b616f68893..89679f217ae 100644 --- a/gdb/testsuite/gdb.arch/i386-size.exp +++ b/gdb/testsuite/gdb.arch/i386-size.exp @@ -35,10 +35,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile # We use gdb_run_cmd so this stands a chance to work for remote # targets too. diff --git a/gdb/testsuite/gdb.arch/i386-unwind.exp b/gdb/testsuite/gdb.arch/i386-unwind.exp index 04ef77132eb..bdcf3da9b94 100644 --- a/gdb/testsuite/gdb.arch/i386-unwind.exp +++ b/gdb/testsuite/gdb.arch/i386-unwind.exp @@ -33,10 +33,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile # Testcase for backtrace/1435. diff --git a/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp b/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp index e9f98d0eb9e..f5f8282dc68 100644 --- a/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp +++ b/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp @@ -23,10 +23,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile # We need to start the inferior to place the breakpoints in the memory at all. if ![runto_main] { diff --git a/gdb/testsuite/gdb.arch/mips-octeon-bbit.exp b/gdb/testsuite/gdb.arch/mips-octeon-bbit.exp index 2b00fe14ce0..40cd02946c2 100644 --- a/gdb/testsuite/gdb.arch/mips-octeon-bbit.exp +++ b/gdb/testsuite/gdb.arch/mips-octeon-bbit.exp @@ -86,10 +86,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \ pass "compilation" -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile # Native needs run. runto_main diff --git a/gdb/testsuite/gdb.arch/pa-nullify.exp b/gdb/testsuite/gdb.arch/pa-nullify.exp index 285047cc95f..577bfbde6f9 100644 --- a/gdb/testsuite/gdb.arch/pa-nullify.exp +++ b/gdb/testsuite/gdb.arch/pa-nullify.exp @@ -40,10 +40,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] ! return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile # In the first test, we do a "step" on a function whose last instruction # contains a branch-with-nullify. The instruction in the delay slot belongs diff --git a/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp index 8179c03f2f1..17bd0787a6c 100644 --- a/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp +++ b/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp @@ -28,10 +28,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] ! return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile # Insert a breakpoint in FUNCTION and verifies that the breakpoint was # inserted at the expected location. EXPECTED_LOCATION should be an diff --git a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp index 72ce2316b16..a4faa2d13dc 100644 --- a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp +++ b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp @@ -29,12 +29,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {qui return -1 } -# Start with a fresh gdb. - -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile if {![runto_main]} { return diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-prologue.exp index edc7116754a..f5b2ab6e102 100644 --- a/gdb/testsuite/gdb.arch/powerpc-prologue.exp +++ b/gdb/testsuite/gdb.arch/powerpc-prologue.exp @@ -31,10 +31,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] ! } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile # # Run to `main' where we begin our tests. diff --git a/gdb/testsuite/gdb.arch/ppc-dfp.exp b/gdb/testsuite/gdb.arch/ppc-dfp.exp index eca44a683e4..25269ba4a2b 100644 --- a/gdb/testsuite/gdb.arch/ppc-dfp.exp +++ b/gdb/testsuite/gdb.arch/ppc-dfp.exp @@ -31,12 +31,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quie return -1 } -# Start with a fresh gdb. - -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile gdb_breakpoint [gdb_get_line_number "Set DFP rounding mode."] diff --git a/gdb/testsuite/gdb.arch/ppc-fp.exp b/gdb/testsuite/gdb.arch/ppc-fp.exp index db7ea1202d5..73073940947 100644 --- a/gdb/testsuite/gdb.arch/ppc-fp.exp +++ b/gdb/testsuite/gdb.arch/ppc-fp.exp @@ -31,12 +31,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quie return -1 } -# Start with a fresh gdb. - -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile gdb_breakpoint [gdb_get_line_number "Invalid operation."] gdb_breakpoint [gdb_get_line_number "Division by zero."] diff --git a/gdb/testsuite/gdb.arch/pr25124.exp b/gdb/testsuite/gdb.arch/pr25124.exp index 45033771d79..4b6dbfd86a2 100644 --- a/gdb/testsuite/gdb.arch/pr25124.exp +++ b/gdb/testsuite/gdb.arch/pr25124.exp @@ -25,12 +25,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir - -# Load the symbol file the first time. -gdb_load ${binfile} +clean_restart $binfile # Check if the disassemble ouput is correct. gdb_test "x /i main+8" \ diff --git a/gdb/testsuite/gdb.arch/s390-multiarch.exp b/gdb/testsuite/gdb.arch/s390-multiarch.exp index 4256d30b0b9..68f339cc283 100644 --- a/gdb/testsuite/gdb.arch/s390-multiarch.exp +++ b/gdb/testsuite/gdb.arch/s390-multiarch.exp @@ -28,8 +28,6 @@ require isnative {istarget s390x-*-*} standard_testfile set binprefix $binfile -gdb_exit - proc compile_and_dump {variant ccopts binfile} { global srcdir subdir srcfile set compile_flags {debug} @@ -136,8 +134,7 @@ if { $core31 != "" } { remote_exec host "$binfile ${core31}.2 ${core31}.3 774" } -gdb_start -gdb_reinitialize_dir $srcdir/$subdir +clean_restart if { $core64 != "" } { test_all_core64 $core64 "no exec" diff --git a/gdb/testsuite/gdb.arch/thumb-prologue.exp b/gdb/testsuite/gdb.arch/thumb-prologue.exp index 1d74a30905a..a33a59b1e6f 100644 --- a/gdb/testsuite/gdb.arch/thumb-prologue.exp +++ b/gdb/testsuite/gdb.arch/thumb-prologue.exp @@ -27,10 +27,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {"add } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile # # Run to `main' where we begin our tests. diff --git a/gdb/testsuite/gdb.arch/thumb2-it.exp b/gdb/testsuite/gdb.arch/thumb2-it.exp index 024718677de..5ea2963dbf7 100644 --- a/gdb/testsuite/gdb.arch/thumb2-it.exp +++ b/gdb/testsuite/gdb.arch/thumb2-it.exp @@ -24,10 +24,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile if {![runto_main]} { return -1 diff --git a/gdb/testsuite/gdb.arch/vsx-regs.exp b/gdb/testsuite/gdb.arch/vsx-regs.exp index 2b72a012ef9..ccb4ee3df9d 100644 --- a/gdb/testsuite/gdb.arch/vsx-regs.exp +++ b/gdb/testsuite/gdb.arch/vsx-regs.exp @@ -184,10 +184,7 @@ if {!$core_supported} { return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile set core_loaded [gdb_core_cmd "$corefile" "re-load generated corefile"] if { $core_loaded == -1 } {