This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH v6 1/5] tdesc: handle arbitrary strings in tdesc_register_in_reggroup_p
- From: Stafford Horne <shorne at gmail dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: GDB patches <gdb-patches at sourceware dot org>, Openrisc <openrisc at lists dot librecores dot org>, Franck Jullien <franck dot jullien at gmail dot com>
- Date: Wed, 3 May 2017 00:41:15 +0900
- Subject: Re: [PATCH v6 1/5] tdesc: handle arbitrary strings in tdesc_register_in_reggroup_p
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com>
On Tue, May 02, 2017 at 03:40:20PM +0100, Yao Qi wrote:
> Stafford Horne <firstname.lastname@example.org> 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 <email@example.com>
> > * 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.
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
info reg system