2003-08-05 Andrew Cagney <cagney@redhat.com>
* reggroups.c (reggroup_next): Check for the final entry.
This commit is contained in:
parent
50d6c87817
commit
9dd5f34f8d
@ -1,3 +1,7 @@
|
||||
2003-08-05 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* reggroups.c (reggroup_next): Check for the final entry.
|
||||
|
||||
2003-08-04 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* monitor.h (monitor_dump_reg_block): Remove ATTR_FORMAT.
|
||||
|
@ -132,13 +132,18 @@ reggroup_next (struct gdbarch *gdbarch, struct reggroup *last)
|
||||
if (groups->first == NULL)
|
||||
groups = &default_groups;
|
||||
|
||||
/* Retun the first/next reggroup. */
|
||||
/* Return the first/next reggroup. */
|
||||
if (last == NULL)
|
||||
return groups->first->group;
|
||||
for (el = groups->first; el != NULL; el = el->next)
|
||||
{
|
||||
if (el->group == last)
|
||||
return el->next->group;
|
||||
{
|
||||
if (el->next != NULL)
|
||||
return el->next->group;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user