From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24325 invoked by alias); 23 Jul 2012 16:39:29 -0000 Received: (qmail 24317 invoked by uid 22791); 23 Jul 2012 16:39:27 -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; Mon, 23 Jul 2012 16:39:14 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6NGdBou003227 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 23 Jul 2012 12:39:11 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q6NGd92B008466; Mon, 23 Jul 2012 12:39:10 -0400 Message-ID: <500D7E2D.6030703@redhat.com> Date: Mon, 23 Jul 2012 16:39: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> <3284947.P03SIJ4rnz@qiyao.dyndns.org> In-Reply-To: <3284947.P03SIJ4rnz@qiyao.dyndns.org> Content-Type: text/plain; charset=UTF-8 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/msg00456.txt.bz2 On 07/23/2012 05:07 PM, Yao Qi wrote: > On Wednesday, June 27, 2012 09:47:55 PM Yao Qi wrote: >> 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? > > The code this patch tries to remove was added by Pedro in this patch, > > [unavailable values part 1, 05/17] move traceframe memory reading fallback > to read-only sections to GDB side > http://sourceware.org/ml/gdb-patches/2011-02/msg00136.html > > in order to make GDB to read read-only memory from the live target. Pedro's > patch did something similar to both remote target and tfile target. It makes > sense to remote target, because there is a live inferior that GDB can access. > However, it is not necessary for tfile target, because there is no live > inferior at all. IMO, it is correct to remove them in this patch. Sorry for the delay. I'll take a look at this very soon. (ping me in a couple days if you don't hear back). -- Pedro Alves