From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11110 invoked by alias); 21 Apr 2014 23:04:08 -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 11101 invoked by uid 89); 21 Apr 2014 23:04:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: elasmtp-kukur.atl.sa.earthlink.net Received: from elasmtp-kukur.atl.sa.earthlink.net (HELO elasmtp-kukur.atl.sa.earthlink.net) (209.86.89.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 21 Apr 2014 23:04:06 +0000 Received: from [68.96.200.16] (helo=macbook2.local) by elasmtp-kukur.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from ) id 1WcNFl-0008HR-O8; Mon, 21 Apr 2014 19:03:57 -0400 Message-ID: <5355A3D8.5030307@earthlink.net> Date: Mon, 21 Apr 2014 23:04:00 -0000 From: Stan Shebs User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Yao Qi , gdb-patches@sourceware.org Subject: Re: [PATCH] Check tracefile is generated by binary execution References: <1395733933-9366-1-git-send-email-yao@codesourcery.com> In-Reply-To: <1395733933-9366-1-git-send-email-yao@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-ELNK-Trace: ae6f8838ff913eba0cc1426638a40ef67e972de0d01da9405caa692ad42a32073426b42d248d327c350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00421.txt.bz2 On 3/25/14 12:52 AM, Yao Qi wrote: > In gdb.trace/tfile.exp, we execute binary to generate tracefile, > > remote_exec target "$binfile" > > however, this fails on bare metal target. This patch is to > handle binary execution failure by running binary in GDB. > The binary will do some io operation to generate tracefile, so > we need a check 'target_info exists gdb,nofileio'. > > This patch is to check whether tracefile is generated. tfile.exp can > be skipped if generation is failed, while test_tfind_tfile in > mi-traceframe-changed.exp is skipped if generated failed. The rest of > the mi-traceframe-changed.exp can still be executed, because on some > bare metal targets, the remote stub may support tracepoint but doesn't > support fileio. > > This patch is tested on nios2-elf and arm-none-eabi. This is OK to push, thanks! OK, one nit: > -remote_exec target "$binfile" > +if { ![generate_tracefile $binfile] } { > + unsupported "Unable to generate tfile" "trace file" instead of "tfile" would be clearer to a test-running person who is not familiar with the details of tracepoint operations. Stan stan@codesourcery.com