From patchwork Wed Sep 21 10:47:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 15835 Received: (qmail 82190 invoked by alias); 21 Sep 2016 10:47:40 -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 82154 invoked by uid 89); 21 Sep 2016 10:47:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=sshd, boards, Yao, H*MI:yao X-HELO: mail-wm0-f65.google.com Received: from mail-wm0-f65.google.com (HELO mail-wm0-f65.google.com) (74.125.82.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Sep 2016 10:47:27 +0000 Received: by mail-wm0-f65.google.com with SMTP id b184so7863900wma.3 for ; Wed, 21 Sep 2016 03:47:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=6cQLj5pen96yZSKuQQVTifAZQp/8k2o3t4tn9R5BcwE=; b=CS+JzFBAAMsCtsMVp7NmPCkZtdA59yoXncHExxw8H2QerJ6gUT1bNMIC24tp0dhRle eTbwYFhTMSWqGKrsYUUbTRxcBK8JKFEO9JKQaONWje2E0dII2MoiA5l3UrgzeTJ2aHtj N/uO8FMBXxMS7ysdqQg50pJtQWRh+lVJYxtIFixocHxJcZCoNp0VTpejQerGsQ/au/v0 m/19c6rLiKaMFKDixofcuZu+zP+yEFsI3lOprbl+iYy8oxluzlkszvCOtz/u6pWSn3Rh m7H+NzngVf5FEKhl0XH3+eiDNBUTjvoIdJ9OR4oOHtv8ef3qhXnnrWPur5vkyVZjSyNS NvrQ== X-Gm-Message-State: AE9vXwPQqWMwROdO9mGitu2QKoTYFysUNDe2y5b9wib25USUGqxZvu6+anR/ngwc+zuCWg== X-Received: by 10.28.105.146 with SMTP id z18mr2432685wmh.109.1474454844819; Wed, 21 Sep 2016 03:47:24 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com ([86.65.39.12]) by smtp.gmail.com with ESMTPSA id h7sm19856647wmg.24.2016.09.21.03.47.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Sep 2016 03:47:24 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH] Use gdbserver-base in remote-gdbserver-on-localhost.exp Date: Wed, 21 Sep 2016 11:47:16 +0100 Message-Id: <1474454836-29396-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes This patch is to make remote-gdbserver-on-localhost.exp use gdbserver-base and remove duplicated code. gdb/testsuite: 2016-09-21 Yao Qi * boards/gdbserver-base.exp (gdb_server_prog): Set the absolute path. * boards/remote-gdbserver-on-localhost.exp: Use gdbserver-base. Remove duplication. --- gdb/testsuite/boards/gdbserver-base.exp | 2 +- .../boards/remote-gdbserver-on-localhost.exp | 37 +--------------------- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/gdb/testsuite/boards/gdbserver-base.exp b/gdb/testsuite/boards/gdbserver-base.exp index 02a9244..2b50588 100644 --- a/gdb/testsuite/boards/gdbserver-base.exp +++ b/gdb/testsuite/boards/gdbserver-base.exp @@ -22,7 +22,7 @@ process_multilib_options "" set_board_info compiler "[find_gcc]" # Test the copy of gdbserver in the build directory. -set_board_info gdb_server_prog "../gdbserver/gdbserver" +set_board_info gdb_server_prog "[pwd]/../gdbserver/gdbserver" # gdbserver does not intercept target file operations and perform them # on the host. diff --git a/gdb/testsuite/boards/remote-gdbserver-on-localhost.exp b/gdb/testsuite/boards/remote-gdbserver-on-localhost.exp index ca907bf..ee3c6e7 100644 --- a/gdb/testsuite/boards/remote-gdbserver-on-localhost.exp +++ b/gdb/testsuite/boards/remote-gdbserver-on-localhost.exp @@ -21,11 +21,7 @@ # bash$ make check RUNTESTFLAGS="--target_board=remote-gdbserver-on-localhost" load_generic_config "gdbserver" - -# The default compiler for this target. -set_board_info compiler "[find_gcc]" - -process_multilib_options "" +load_board_description "gdbserver-base" # The sshd should be running on localhost and ssh key should be # correctly set up that you ssh to localhost without having to type @@ -39,44 +35,13 @@ set_board_info hostname localhost # We will be using the standard GDB remote protocol set_board_info gdb_protocol "remote" -# Test the copy of gdbserver in the build directory, of an absolute path. -set_board_info gdb_server_prog "[pwd]/../gdbserver/gdbserver" - # Use techniques appropriate to a stub set_board_info use_gdb_stub 1 # This gdbserver can only run a process once per session. set_board_info gdb,do_reload_on_run 1 -# gdbserver does not intercept target file operations and perform them -# on the host. -set_board_info gdb,nofileio 1 - # There's no support for argument-passing (yet). set_board_info noargs 1 set_board_info exit_is_reliable 1 - -# The predefined TSVs in GDBserver. -set_board_info gdb,predefined_tsv "\\\$trace_timestamp" - -set GDBFLAGS "${GDBFLAGS} -ex \"set auto-connect-native-target off\"" - -proc ${board}_download { board src dest } { - if { [file pathtype $src] == "relative" } { - return [file join [pwd] $src] - } else { - return $src - } -} - -proc ${board}_upload {dest srcfile args} { - return $srcfile -} - -proc ${board}_file { dest op args } { - if { $op == "delete" } { - return 0 - } - return [eval [list standard_file $dest $op] $args] -}