From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 882 invoked by alias); 9 Mar 2013 03:49:18 -0000 Received: (qmail 867 invoked by uid 22791); 9 Mar 2013 03:49:17 -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; Sat, 09 Mar 2013 03:49:06 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UEAmP-0003dQ-GD from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Fri, 08 Mar 2013 19:49:05 -0800 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 8 Mar 2013 19:49:05 -0800 Received: from qiyao.dyndns.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.1.289.1; Fri, 8 Mar 2013 19:49:04 -0800 From: Yao Qi To: Subject: [PATCH v3 10/15] tstatus.exp: ctf Date: Sat, 09 Mar 2013 03:49:00 -0000 Message-ID: <1362800844-27940-11-git-send-email-yao@codesourcery.com> In-Reply-To: <1362800844-27940-1-git-send-email-yao@codesourcery.com> References: <1362800844-27940-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-03/txt/msg00399.txt.bz2 Similarly, the output of "tstatus" should be identical to the output when trace status is read from tfile or live target. gdb/testsuite: 2013-03-08 Yao Qi * gdb.trace/tstatus.exp: Save trace data to CTF. If ctf target is supported, change to ctf target, read trace data and check output of command "tstatus". --- gdb/testsuite/gdb.trace/tstatus.exp | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/gdb/testsuite/gdb.trace/tstatus.exp b/gdb/testsuite/gdb.trace/tstatus.exp index c105048..7668240 100644 --- a/gdb/testsuite/gdb.trace/tstatus.exp +++ b/gdb/testsuite/gdb.trace/tstatus.exp @@ -139,6 +139,9 @@ test_tracepoints # Save trace frames to tfile. gdb_test "tsave tstatus.tf" "Trace data saved to file 'tstatus.tf'.*" +# Save trace frames to CTF. +gdb_test "tsave -ctf ${testfile}.ctf" \ + "Trace data saved to directory 'tstatus.ctf'.*" # Change target to tfile. set test "change to tfile target" @@ -159,3 +162,13 @@ set tstatus_output [string map {\) \\)} $tstatus_output] # The status should be identical to the status of live inferior. gdb_test "tstatus" "Using a trace file\.\r\n${tstatus_output}.*" \ "tstatus on tfile target" + +# Change target to ctf if GDB supports. +gdb_test_multiple "target ctf ${testfile}.ctf" "" { + -re "Undefined target command: \"ctf ${testfile}.ctf\"\. Try \"help target\"\.\r\n$gdb_prompt $" { + } + -re ".*\r\n$gdb_prompt $" { + gdb_test "tstatus" "Using a trace file\.\r\n${tstatus_output}.*" \ + "tstatus on ctf target" + } +} -- 1.7.7.6