From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8024 invoked by alias); 13 Apr 2006 02:41:51 -0000 Received: (qmail 8016 invoked by uid 22791); 13 Apr 2006 02:41:49 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 13 Apr 2006 02:41:47 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k3D2fjXD020121; Wed, 12 Apr 2006 22:41:45 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.11.6) with ESMTP id k3D2fi1S003498; Wed, 12 Apr 2006 22:41:44 -0400 Received: from [172.16.24.50] (bluegiant.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id k3D2fhTq013946; Wed, 12 Apr 2006 22:41:43 -0400 Message-ID: <443DBA66.6050409@redhat.com> Date: Thu, 13 Apr 2006 02:41:00 -0000 From: Michael Snyder User-Agent: Mozilla Thunderbird 1.0.7-1.4.1 (X11/20050929) MIME-Version: 1.0 To: "David S. Miller" CC: gdb-patches@sources.redhat.com Subject: Re: [PATCH]: Don't use deprecated regcache functions References: <20060411130057.GA21369@nevyn.them.org> <20060411.141334.116677120.davem@davemloft.net> <443D540D.2050902@redhat.com> <20060412.180948.72680402.davem@davemloft.net> In-Reply-To: <20060412.180948.72680402.davem@davemloft.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00160.txt.bz2 David S. Miller wrote: > From: Michael Snyder > Date: Wed, 12 Apr 2006 12:25:01 -0700 > > >>David S. Miller wrote: >> >>>From: Daniel Jacobowitz >>>Date: Tue, 11 Apr 2006 09:00:57 -0400 >>> >>> >>> >>>>On Tue, Apr 11, 2006 at 01:39:09AM -0700, David S. Miller wrote: >>>> >>>> >>>>>Otherwise, ok to apply? >>>> >>>>>- deprecated_read_register_gen (regno, raw); >>>>>+ regcache_raw_collect (current_regcache, regno, raw); >>>>> thread_db_fetch_registers (-1); >>>>> regcache_raw_supply (current_regcache, regno, raw); >>>> >>>>I might be mistaken, but what the heck does the call to >>>>thread_db_fetch_registers accomplish? I think nothing. >> >>Daniel, David's got the right of it. > > Ok to apply? :-) Well, I meant your explanation as to why thread_db_fetch_registers was used. Now that I look at the actual change... Why did you pick register_raw_collect as the replacement? It's not semantically equivalent. I would have thought that the least-intrusive, most semantically-neutral change would have been to use regcache_cooked_read. That doesn't mean I think it's more or less correct... I get confused just thinking about all these variants. If you have an argument for why one is more correct in this context, I'm certainly open to it. I can't really convince myself that the current behavior is correct, since deprecated_read_register_gen calls regcache_cooked_read, which may call regcache_raw_read, which may call target_fetch_registers *before* capturing the current value. Which it seems like would defeat the purpose of the whole exercise...