From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26413 invoked by alias); 2 May 2017 15:41:20 -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 26393 invoked by uid 89); 2 May 2017 15:41:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=Stafford, Hx-languages-length:1650 X-HELO: mail-pg0-f66.google.com Received: from mail-pg0-f66.google.com (HELO mail-pg0-f66.google.com) (74.125.83.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 May 2017 15:41:17 +0000 Received: by mail-pg0-f66.google.com with SMTP id i63so3568955pgd.2 for ; Tue, 02 May 2017 08:41:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=cHkuVWrmHvj4uR0gDT3XIIcmrznMHKkaEpKqiUAojE0=; b=PTNUU8UlqxrelPReY50fY02RklsBN5x2jAGdQ+AjpI1/NT8aeKqHWGqvg8NiTx86Ae HJHOi6SEQ75O8S1HDaISkQ6hzGd5FeM7w3KdU8/5IlLrDiiamha7YAmNfU+4VdPaUxpt 4V57X1flo6djkusfnTZN1eeog1z06R7X/5A6jKQbBZqQidokk8EYa4TGDs8fanfOIeBu 5NMVKspFUspvho+skQgMYWRPJ/97WH1ogedPG+Ch+KEwTvsSe7UtOvzdAC+O0/w8m3jI F+WK0qNJh0lxNFh/Nlb8qbIYgh1uNb09j/2mNfhYdZrZ5xZk50aOde3XuD4760ov+IwV 7dNQ== X-Gm-Message-State: AN3rC/5XwOzNJ0uIwmMkITTjp0Nbytx67lWxjDmC9I8LsCi0IsFxpSFg 2fEGjWiCgdv2/XDr X-Received: by 10.98.65.69 with SMTP id o66mr32597953pfa.221.1493739678840; Tue, 02 May 2017 08:41:18 -0700 (PDT) Received: from localhost (z209.124-44-183.ppp.wakwak.ne.jp. [124.44.183.209]) by smtp.gmail.com with ESMTPSA id p7sm28365080pfb.125.2017.05.02.08.41.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 May 2017 08:41:18 -0700 (PDT) Date: Tue, 02 May 2017 15:41:00 -0000 From: Stafford Horne To: Yao Qi Cc: GDB patches , Openrisc , Franck Jullien Subject: Re: [PATCH v6 1/5] tdesc: handle arbitrary strings in tdesc_register_in_reggroup_p Message-ID: <20170502154115.GH2724@lianli.shorne-pla.net> References: <86r307725n.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86r307725n.fsf@gmail.com> User-Agent: Mutt/1.8.0 (2017-02-23) X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00014.txt.bz2 On Tue, May 02, 2017 at 03:40:20PM +0100, Yao Qi wrote: > Stafford Horne writes: > > > tdesc_register_in_reggroup_p in now able to handle arbitrary > > groups. This is useful when groups are created while the > > target descriptor file is received from the remote. > > > > This can be the case of a soft core target processor where > > registers/groups can change. > > > > gdb/ChangeLog: > > > > 2013-02-15 Franck Jullien > > > > * target-descriptions.c (tdesc_register_in_reggroup_p): Support > > arbitrary strings. > > I am not sure what do you want to change and why do you need this > change? I didn't see it in the previous version. > > If you want to control what registers are displayed, you can follow the > way nds32 used, see nds32-tdep.c:nds32_register_reggroup_p. Hi Yao, Thanks for reviewing. Sorry, this was in previous versions but dropped on accident then added back, I forgot to mention. Currenly tdesc_register_in_reggroup_p() only returns true if the register group number is one of the hard coded reggroups: float, vector, general, save or restor. This change is to also allow returning true in the case that the register group was registered with gdb with reggroup_add(). This seems like something that will be generally required so it was added to the target-descriptions definition. If you think not I can make it for openrisc only, but I think it makes more sense in tdesc. This allows the command like, the below to return the registers for the named reggroup. info reg system -Stafford