From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5532 invoked by alias); 23 Jan 2012 14:29:29 -0000 Received: (qmail 5524 invoked by uid 22791); 23 Jan 2012 14:29:28 -0000 X-SWARE-Spam-Status: No, hits=0.5 required=5.0 tests=AWL,BAYES_40,FROM_12LTRDOM X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 Jan 2012 14:29:15 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1RpKtW-0001Ky-VU from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Mon, 23 Jan 2012 06:29:15 -0800 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 23 Jan 2012 06:28:33 -0800 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.1.289.1; Mon, 23 Jan 2012 06:29:12 -0800 Message-ID: <4F1D6EB4.2030205@codesourcery.com> Date: Mon, 23 Jan 2012 16:03:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111220 Thunderbird/9.0 MIME-Version: 1.0 To: Subject: [patch 8/8] Control agent in testsuite References: <4F1D55D7.7030506@codesourcery.com> In-Reply-To: <4F1D55D7.7030506@codesourcery.com> Content-Type: multipart/mixed; boundary="------------020005030505050306000803" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00772.txt.bz2 --------------020005030505050306000803 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Content-length: 424 After using agent, we need to run testsuite in two cases, agent is on and off. This patch is to add such logic in testsuite, so that we can control this through board file. If we add the following line in board file, set_board_info use_agent "on" the agent is always turned on for remote testing. We need also to turn agent on in native debugging, but I'll postpone it when gdb starts to use agent. -- Yao (齐尧) --------------020005030505050306000803 Content-Type: text/x-patch; name="0008-set-agent-on-in-board-file.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0008-set-agent-on-in-board-file.patch" Content-length: 1031 2012-01-22 Yao Qi * lib/gdbserver-support.exp (gdbserver_run): Set agent on or off if use_agent exits in board file. --- gdb/testsuite/lib/gdbserver-support.exp | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp index 11d9107..e72fc36 100644 --- a/gdb/testsuite/lib/gdbserver-support.exp +++ b/gdb/testsuite/lib/gdbserver-support.exp @@ -337,7 +337,17 @@ proc gdbserver_run { child_args } { set gdbserver_protocol [lindex $res 0] set gdbserver_gdbport [lindex $res 1] - return [gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport] + set ret [gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport] + + if [target_info exists use_agent] { + send_gdb "set agent [target_info use_agent]\n" + gdb_expect 120 { + -re "^set agent \(on|off\)\r\n$gdb_prompt $" { + } + } + } + + return $ret } # Reconnect to the previous gdbserver session. -- 1.7.0.4 --------------020005030505050306000803--