From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1152 invoked by alias); 27 Feb 2013 02:19:07 -0000 Received: (qmail 955 invoked by uid 22791); 27 Feb 2013 02:19:02 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL 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; Wed, 27 Feb 2013 02:18:50 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UAWbY-0001zF-Ft from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Tue, 26 Feb 2013 18:18:48 -0800 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 26 Feb 2013 18:18:48 -0800 Received: from qiyao.dyndns.org.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.1.289.1; Tue, 26 Feb 2013 18:18:47 -0800 From: Yao Qi To: Subject: [PATCH 5/5] ctf test: report.exp Date: Wed, 27 Feb 2013 02:19:00 -0000 Message-ID: <1361931459-3953-6-git-send-email-yao@codesourcery.com> In-Reply-To: <1361931459-3953-1-git-send-email-yao@codesourcery.com> References: <1361931459-3953-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain 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: 2013-02/txt/msg00671.txt.bz2 This is a test to see GDB gets the same output as live inferior and TFILE trace format. This patch depends on this patch, [PATCH 1/2] Check trace data from trace file http://sourceware.org/ml/gdb-patches/2013-02/msg00611.html gdb/testsuite: 2013-02-27 Yao Qi * gdb.trace/report.exp: Test GDB saves trace data to CTF format and read CTF trace file if GDB supports. --- gdb/testsuite/gdb.trace/report.exp | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/gdb/testsuite/gdb.trace/report.exp b/gdb/testsuite/gdb.trace/report.exp index b32bca1..d074c1f 100644 --- a/gdb/testsuite/gdb.trace/report.exp +++ b/gdb/testsuite/gdb.trace/report.exp @@ -408,6 +408,10 @@ gdb_tfind_test "finished: make sure not debugging any trace frame" \ # Save trace frames to tfile. gdb_test "tsave report.tf" "Trace data saved to file 'report.tf'.*" +# Save trace frames to ctf. +gdb_test "tsave -ctf report.ctf" \ + "Trace data saved to directory 'report.ctf'.*" + # Change target to tfile. set test "change to tfile target" gdb_test_multiple "target tfile report.tf" "$test" { @@ -421,3 +425,20 @@ gdb_test_multiple "target tfile report.tf" "$test" { } # Test the collected trace frames from tfile. use_collected_data "tfile" + +# Save trace frames to ctf format if GDB is able to read ctf data. +set gdb_can_read_ctf_data 0 +gdb_test_multiple "target ctf" "" { + -re "Undefined target command: \"ctf\"\. Try \"help target\"\.\r\n$gdb_prompt $" { + set gdb_can_read_ctf_data 0 + } + -re "No CTF directory specified.*\r\n$gdb_prompt $" { + set gdb_can_read_ctf_data 1 + } +} + +if { $gdb_can_read_ctf_data } { + # Change target to ctf. + gdb_test_no_output "target ctf report.ctf" "change to ctf target" + use_collected_data "ctf" +} -- 1.7.7.6