From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12904 invoked by alias); 3 Apr 2013 03:34:14 -0000 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 Received: (qmail 12889 invoked by uid 89); 3 Apr 2013 03:34:14 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 03 Apr 2013 03:34:11 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UNESe-0004ml-Om from Yao_Qi@mentor.com ; Tue, 02 Apr 2013 20:34:08 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 2 Apr 2013 20:34:09 -0700 Received: from qiyao.dyndns.org (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; Tue, 2 Apr 2013 20:34:07 -0700 Message-ID: <515BA2E7.6080808@codesourcery.com> Date: Wed, 03 Apr 2013 15:53:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Doug Evans CC: Pedro Alves , gdb-patches Subject: Re: [PATCH] Add completer to commands 'target {core/tfile/exec}' References: <1364462710-16702-1-git-send-email-yao@codesourcery.com> <51545E43.1020703@redhat.com> <5155B1A9.3030503@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-SW-Source: 2013-04/txt/msg00070.txt.bz2 On 04/03/2013 05:15 AM, Doug Evans wrote: > Hi. This test is failing for me because I have another file that > begins with "basic". > Can you change this to use "tfile-basic" instead of "basic? OK, the patch below is to rename basic.tf and error.tf to tfile-basic.tf and tfile-error.tf. Tested on x86_64-linux. Committed. -- Yao (齐尧) gdb/testsuite: 2013-04-03 Yao Qi * gdb.trace/tfile.c (write_basic_trace_file): Pass argument "tfile-basic.tf" instead of "basic.tf". (write_error_trace_file): Pass argument "tfile-error.tf" instead of "error.tf". * gdb.trace/tfile.exp: Update tfile names to "tfile-basic.tf" and "tfile-error.tf". --- gdb/testsuite/gdb.trace/tfile.c | 4 ++-- gdb/testsuite/gdb.trace/tfile.exp | 24 +++++++++++++----------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/gdb/testsuite/gdb.trace/tfile.c b/gdb/testsuite/gdb.trace/tfile.c index 3ee3ac5..7020744 100644 --- a/gdb/testsuite/gdb.trace/tfile.c +++ b/gdb/testsuite/gdb.trace/tfile.c @@ -92,7 +92,7 @@ write_basic_trace_file (void) int fd, int_x; short short_x; - fd = start_trace_file ("basic.tf"); + fd = start_trace_file ("tfile-basic.tf"); /* The next part of the file consists of newline-separated lines defining status, tracepoints, etc. The section is terminated by @@ -177,7 +177,7 @@ write_error_trace_file (void) int len = sizeof (made_up) - 1; char *hex = alloca (len * 2 + 1); - fd = start_trace_file ("error.tf"); + fd = start_trace_file ("tfile-error.tf"); /* The next part of the file consists of newline-separated lines defining status, tracepoints, etc. The section is terminated by diff --git a/gdb/testsuite/gdb.trace/tfile.exp b/gdb/testsuite/gdb.trace/tfile.exp index f259952..087d207 100644 --- a/gdb/testsuite/gdb.trace/tfile.exp +++ b/gdb/testsuite/gdb.trace/tfile.exp @@ -33,21 +33,22 @@ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ gdb_reinitialize_dir $srcdir/$subdir # Make sure we are starting fresh. -remote_file host delete basic.tf -remote_file host delete error.tf -remote_file target delete basic.tf -remote_file target delete error.tf +remote_file host delete tfile-basic.tf +remote_file host delete tfile-error.tf +remote_file target delete tfile-basic.tf +remote_file target delete tfile-error.tf remote_exec target "$binfile" # Copy tracefile from target to host through build. -remote_download host [remote_upload target basic.tf] basic.tf -remote_download host [remote_upload target error.tf] error.tf +remote_download host [remote_upload target tfile-basic.tf] tfile-basic.tf +remote_download host [remote_upload target tfile-error.tf] tfile-error.tf gdb_load $binfile # Program has presumably exited, now target a trace file it created. -gdb_test "target tfile basic.tf" "Created tracepoint.*" "target tfile" +gdb_test "target tfile tfile-basic.tf" "Created tracepoint.*" \ + "target tfile" gdb_test "info trace" ".*tracepoint.*in write_basic_trace_file.*" \ "info tracepoints on trace file" @@ -107,7 +108,8 @@ gdb_start gdb_load $binfile -gdb_test "target tfile error.tf" "Created tracepoint.*" "target tfile" +gdb_test "target tfile tfile-error.tf" "Created tracepoint.*" \ + "target tfile" gdb_test "tstatus" \ "Using a trace file.* @@ -119,14 +121,14 @@ Not looking at any trace frame.*" \ # Make sure we can reopen without error. gdb_test \ - "interpreter-exec mi \"-target-select tfile basic.tf\"" \ + "interpreter-exec mi \"-target-select tfile tfile-basic.tf\"" \ "\\^connected.*" gdb_test "interpreter-exec mi \"-trace-status\"" \ - "\\^done,supported=\"file\",trace-file=\".*basic.tf\",running=\"0\",stop-reason=\"request\",frames=\"${decimal}\",frames-created=\"${decimal}\",buffer-size=\"${decimal}\",buffer-free=\"${decimal}\",disconnected=\".*\",circular=\".*\",user-name=\"\",notes=\"\",start-time=\".*\",stop-time=\".*\"" \ + "\\^done,supported=\"file\",trace-file=\".*tfile-basic.tf\",running=\"0\",stop-reason=\"request\",frames=\"${decimal}\",frames-created=\"${decimal}\",buffer-size=\"${decimal}\",buffer-free=\"${decimal}\",disconnected=\".*\",circular=\".*\",user-name=\"\",notes=\"\",start-time=\".*\",stop-time=\".*\"" \ "-trace-status" # Test completion works well. -gdb_test "target tfile basic\t" "Assuming tracepoint.*" \ +gdb_test "target tfile tfile-basic\t" "Assuming tracepoint.*" \ "complete-command 'target tfile'" -- 1.7.7.6