This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Register group proposal
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: Register group proposal
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Date: Thu, 22 Feb 2001 10:55:32 +0200 (IST)
- cc: Nick Duffek <nsd at redhat dot com>, insight at sources dot redhat dot com, gdb at sources dot redhat dot com, fnasser at redhat dot com
On Wed, 21 Feb 2001, Andrew Cagney wrote:
> I guess this is called as something like (I'll take the liberty of using
> slightly different names):
>
> for (regnum = REGGROUP_FIRST_REGNUM (reggroup);
> regnum >= 0;
> retnum = REGGROUP_NEXT_REGNUM (reggroup, regnum))
> {
> apply regnum;
> }
If we are to use an iterator, shouldn't the test in this loop be
abstracted as well, like this, for instance?
for (regnum = REGGROUP_FIRST_REGNUM (reggroup);
REGGROUP_NOT_LAST_REGNUM (reggroup);
regnum = REGGROUP_NEXT_REGNUM (reggroup, regnum))
{
apply regnum;
}