From patchwork Tue Jul 21 03:47:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 7769 Received: (qmail 1619 invoked by alias); 21 Jul 2015 03:47:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 1598 invoked by uid 89); 21 Jul 2015 03:47:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f202.google.com Received: from mail-pd0-f202.google.com (HELO mail-pd0-f202.google.com) (209.85.192.202) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 21 Jul 2015 03:47:51 +0000 Received: by pdbfo6 with SMTP id fo6so2864362pdb.1 for ; Mon, 20 Jul 2015 20:47:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:message-id:date:subject:from:to :content-type; bh=u4WIqKShhYgDwriu4YVyR9HDelQd/xgyw3ugMDkcnYM=; b=WsAB4Bjop9/XmP9lzuOczW4mplLWbZ3NgWItRf0e81ZhmtSBuPDEH89eSzxG6t2KAG IvDqDJnqQHOMas1uIWHYc1tyb76mnv6kVZ5SLlLFBnkasBtioEr8zV2fccQ19WbW3Yx4 NdIfFWFYSWiJnKEH6BhsRDL+TbHYPHAuJDEIEzh+OBwSHzD4B4Pvj7uOHp58BYsELCRG G7aSLMHlQKHEicyePQ1K9hjZpw8FujT+c3NLBP7Y7yGE5vyEk3Sw7gY6ihq29PdsDHKc 8UMibVgiTWhVVMqrlZIZeMmEihLN1i+whkK/h47qaPJYy2frAq9/ZVY6Nv273a+YRW0A a7Cw== X-Gm-Message-State: ALoCoQkbBO/r/IV4yneRmf9c6UgS6BghOZmrYNfmgWGeJ/tiET7oemVdqldEx+duLwmuh6veYyoEGyF18gK7qrasztjZIN+czRoV4lHyAkZ68SrWett29lTRbGdhDulKw+Gv33oeaoCUl1uxkOo1cGF+AD7abDuonJ/MWKKft5sVPyxSMEySxRw= MIME-Version: 1.0 X-Received: by 10.66.102.6 with SMTP id fk6mr35407499pab.6.1437450469526; Mon, 20 Jul 2015 20:47:49 -0700 (PDT) Message-ID: <047d7bd9037c9e961c051b5a848d@google.com> Date: Tue, 21 Jul 2015 03:47:49 +0000 Subject: [PATCH 1/8] gen-perf-test: clean_restart From: Doug Evans To: gdb-patches@sourceware.org X-IsSubscribed: yes Hi. This patch just makes the executable arg to clean_restart optional. 2015-07-20 Doug Evans * lib/gdb.exp (clean_restart): Make executable optional. # Prepares for testing by calling build_executable_full, then diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 0805de9..6ee609b 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4869,18 +4869,27 @@ proc build_executable { testname executable {sources ""} {options {debug}} } { return [eval build_executable_from_specs $arglist] } -# Starts fresh GDB binary and loads EXECUTABLE into GDB. EXECUTABLE is -# the basename of the binary. -# The return value is 0 for success, -1 for failure. -proc clean_restart { executable } { +# Starts fresh GDB binary and loads an optional executable into GDB. +# Usage: clean_restart [executable] +# EXECUTABLE is the basename of the binary. + +proc clean_restart { args } { global srcdir global subdir - set binfile [standard_output_file ${executable}] + + if { [llength $args] > 1 } { + error "bad number of args: [llength $args]" + } gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir - return [gdb_load ${binfile}] + + if { [llength $args] >= 1 } { + set executable [lindex $args 0] + set binfile [standard_output_file ${executable}] + gdb_load ${binfile} + } }