From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id BE04C3858D28; Fri, 27 Jan 2023 01:29:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE04C3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674782960; bh=v99oXrIM6pehGulrowdR2ZQt3bO5vh33L8UzzXd2pXk=; h=From:To:Subject:Date:From; b=IVxtZD0r1w9QBbNtKNsqyPV0jPyllLXmMOnpu7EeWw66ejjGqaAmG4STQfzyRc5et S9VPGW0S93xPyzOz9mehJR1RylxPdcqOnlL+OEY3wpCZ1fVMbUyH0BMHRBdLpHQWrZ 9TPm9c1jF9QI0uq7blWPRiobwLtM61fX3Ier5I3g= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Start gdb after building executable in mi-basics.exp X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 306e12673e49e32f1e64d9dca7a30fe8add42e1c X-Git-Newrev: d6acf25c03f8c507e134f7438bd4360464ce111e Message-Id: <20230127012920.BE04C3858D28@sourceware.org> Date: Fri, 27 Jan 2023 01:29:20 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dd6acf25c03f8= c507e134f7438bd4360464ce111e commit d6acf25c03f8c507e134f7438bd4360464ce111e Author: Tom Tromey Date: Wed Jan 25 10:00:58 2023 -0700 Start gdb after building executable in mi-basics.exp =20 A lot of the MI tests start gdb and only then build the executable. This just seemed weird to me, so I've fixed this up. In this patch, no other cleanups are done, the startup is just moved to a more logical (to me) spot. Diff: --- gdb/testsuite/gdb.mi/mi-basics.exp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.mi/mi-basics.exp b/gdb/testsuite/gdb.mi/mi-b= asics.exp index 086ce74eae5..30d0da6ed02 100644 --- a/gdb/testsuite/gdb.mi/mi-basics.exp +++ b/gdb/testsuite/gdb.mi/mi-basics.exp @@ -28,11 +28,6 @@ load_lib mi-support.exp set MIFLAGS "-i=3Dmi" =20 -gdb_exit -if [mi_gdb_start separate-inferior-tty] { - return -} - standard_testfile basics.c # This file was audited to ensure that the explicit references to # objdir in it are safe for parallel testing. Please be sure to @@ -49,6 +44,11 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${b= infile}" executable {deb # In this file we want to test if the operations needed by the following # procedures work, so it makes no sense using them here. =20 +gdb_exit +if [mi_gdb_start separate-inferior-tty] { + return +} + # mi_delete_breakpoints # mi_gdb_reinitialize_dir $srcdir/$subdir # mi_gdb_load ${binfile}