From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25066 invoked by alias); 27 Jul 2012 14:09:09 -0000 Received: (qmail 25058 invoked by uid 22791); 27 Jul 2012 14:09:08 -0000 X-SWARE-Spam-Status: No, hits=-7.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 Jul 2012 14:08:40 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6RE8b3R018808 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 27 Jul 2012 10:08:37 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q6RE8aOi010515; Fri, 27 Jul 2012 10:08:36 -0400 Message-ID: <5012A0E3.8000808@redhat.com> Date: Fri, 27 Jul 2012 14:09:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [RFC] remove set_tfile_traceframe and cur_traceframe_number References: <1340804875-23979-1-git-send-email-yao@codesourcery.com> In-Reply-To: <1340804875-23979-1-git-send-email-yao@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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-07/txt/msg00685.txt.bz2 On 06/27/2012 02:47 PM, Yao Qi wrote: > Hi, > I can't see the necessity to use function set_tfile_traceframe and > variable cur_traceframe_number. IIUC, both set_tfile_traceframe > and cur_traceframe_number are equivalent to remote.c:set_remote_traceframe > and remote.c:remote_traceframe_number. set_remote_traceframe > and remote_traceframe_number are used to switch between traceframe > and live inferior in a lazy mode. However, this requirement doesn't > exists in tfile, because GDB only reads from trace file. This is > the reason I propose to remove them. Regression tested on native > and gdbserver on x86_64-linux. OK to apply? OK. Thanks. Nits: > 2012-06-27 Yao Qi > > * tracepoint.c (set_tfile_traceframe): Removed. "Remove." > (tfile_trace_find, tfile_fetch_registers): Update callers. > (tfile_xfer_partial, tfile_get_trace_state_variable_value): Likewise. > Remove cur_traceframe_number. This is a global. So should be: (cur_traceframe_number): Remove. and should be first thing in the entry. -- Pedro Alves