From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27360 invoked by alias); 3 May 2017 09:27: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 27350 invoked by uid 89); 3 May 2017 09:27:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=defer X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 May 2017 09:27:12 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B05A761B8F; Wed, 3 May 2017 09:27:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B05A761B8F Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B05A761B8F Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3DD0417AB7; Wed, 3 May 2017 09:27:12 +0000 (UTC) Subject: Re: [PATCH 8/11] Add FRV_MAX_REGISTER_SIZE To: Yao Qi , Alan Hayward References: <3B3BD949-1C9D-44FF-AB6A-03091ECA49D0@arm.com> <867f2rw9br.fsf@gmail.com> <22BD364F-A9A9-4E21-BC47-96A320760640@arm.com> <86d1bqba87.fsf@gmail.com> Cc: "gdb-patches@sourceware.org" , nd From: Pedro Alves Message-ID: Date: Wed, 03 May 2017 09:27:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <86d1bqba87.fsf@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-05/txt/msg00041.txt.bz2 On 05/03/2017 09:44 AM, Yao Qi wrote: > Alan Hayward writes: > > Hi Alan, > regcache.c is updated, so please update your patch. > >> I considered making regcache_raw_supply_zero call regcache_raw_supply, but >> in the end it made more sense to make it completely separate. > > You can call raw_supply (regnum, NULL) and then set the status to REG_VALID. > I think I agree with Alan -- if we defer to raw_supply, then I'd still prefer that the memset is still done in regcache_raw_supply_zero, because whether unavailable registers actually have a contents buffer at all is implementation detail. We currently zero REG_UNVAILABLE registers in raw_supply, but that could change. (And if we reuse raw_supply as is, then memset, we'll memset twice.) BTW, note that gdbserver has an equivalent function, called "supply_register_zeroed". Thanks, Pedro Alves