From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3839 invoked by alias); 29 Mar 2012 09:18:17 -0000 Received: (qmail 3822 invoked by uid 22791); 29 Mar 2012 09:18:16 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 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; Thu, 29 Mar 2012 09:17:53 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1SDBUO-0007a9-Ps from Hui_Zhu@mentor.com for gdb-patches@sourceware.org; Thu, 29 Mar 2012 02:17:52 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 29 Mar 2012 02:17:52 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.1.289.1; Thu, 29 Mar 2012 02:17:51 -0700 Message-ID: <4F7428BD.30408@mentor.com> Date: Thu, 29 Mar 2012 09:18:00 -0000 From: Hui Zhu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120310 Thunderbird/11.0 MIME-Version: 1.0 To: Subject: [PATCH] testsuite tfind.exp: If current target don't support trace, try gdbserver. Content-Type: multipart/mixed; boundary="------------000509060009010007040002" 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-03/txt/msg00979.txt.bz2 --------------000509060009010007040002 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 570 Hi, When we want to test the trace function that in gdb.trace directory, we will got a lot of UNSUPPORTED. To use this testcase, we need follow way in http://sourceware.org/gdb/wiki/TestingGDB#Testing_gdbserver_in_a_native_configuration. So I post a patch add some code if current target don't support trace, try gdbserver in tfind.exp. If this patch goes OK. I will post patch for other testsuite that support by gdbserver. Thanks. Hui 2012-03-29 Hui Zhu * gdb.trace/tfind.exp: If current target don't support trace, try gdbserver. --------------000509060009010007040002 Content-Type: text/plain; charset="us-ascii"; name="testsuite_trace_use_gdbserver.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="testsuite_trace_use_gdbserver.txt" Content-length: 883 --- testsuite/gdb.trace/tfind.exp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) --- a/testsuite/gdb.trace/tfind.exp +++ b/testsuite/gdb.trace/tfind.exp @@ -36,10 +36,25 @@ gdb_test "tfind none" ".*" "" runto_main gdb_reinitialize_dir $srcdir/$subdir -if { ![gdb_target_supports_trace] } then { - unsupported "Current target does not support trace" - return 1; +if ![gdb_target_supports_trace] { + load_lib gdbserver-support.exp + clean_restart $testfile + + if { [skip_gdbserver_tests] } { + unsupported "target does not support trace" + return -1; + } + + gdb_test "disconnect" ".*" + + gdbserver_run "" + gdb_reinitialize_dir $srcdir/$subdir + + if ![gdb_target_supports_trace] { + unsupported "target does not support trace" + return -1; + } } # If testing on a remote host, download the source file. --------------000509060009010007040002--