diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-08-04 20:34:10 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-08-04 20:34:10 +0000 |
commit | 6c7d17ba3a5d982ae1c2b972417aedce0f404cf5 (patch) | |
tree | 2608b73719576cc5a6c1aa63742969c4ded95f3c /gdb/reggroups.h | |
parent | 95cd630eaeeb7c59acb5129df8a18b808dfabe23 (diff) | |
download | gdb-6c7d17ba3a5d982ae1c2b972417aedce0f404cf5.zip gdb-6c7d17ba3a5d982ae1c2b972417aedce0f404cf5.tar.gz gdb-6c7d17ba3a5d982ae1c2b972417aedce0f404cf5.tar.bz2 |
2003-08-04 Andrew Cagney <cagney@redhat.com>
* reggroups.c (struct reggroup_el): Define.
(struct reggroups): Delete field "nr_group". Replace array
"group" with a "first" to "last" linked list.
(reggroups_init): Update. Allocate using gdbarch's obstack.
(reggroups_free): Delete function.
(add_group): Update. Add "el" parameter.
(reggroup_add): Pass gdbarch obstack allocated space to add_group.
(default_groups): Update.
(reggroup_next): Replace reggroups.
(reggroups_dump): Update.
(_initialize_reggroup): Pass XMALLOC allocated space to add_group.
* regcache.c (regcache_dump): Use reggroup_next instead of reggroups.
* infcmd.c (registers_info): Use reggroup_next instead of reggroups.
Diffstat (limited to 'gdb/reggroups.h')
-rw-r--r-- | gdb/reggroups.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/reggroups.h b/gdb/reggroups.h index 0088a85..22c0a6f 100644 --- a/gdb/reggroups.h +++ b/gdb/reggroups.h @@ -51,8 +51,11 @@ extern void reggroup_add (struct gdbarch *gdbarch, struct reggroup *group); extern const char *reggroup_name (struct reggroup *reggroup); extern enum reggroup_type reggroup_type (struct reggroup *reggroup); -/* The register groups for the current architecture. */ -extern struct reggroup *const *reggroups (struct gdbarch *gdbarch); +/* Interator for the architecture's register groups. Pass in NULL, + returns the first group. Pass in a group, returns the next group, + or NULL when the last group is reached. */ +extern struct reggroup *reggroup_next (struct gdbarch *gdbarch, + struct reggroup *last); /* Is REGNUM a member of REGGROUP? */ extern int default_register_reggroup_p (struct gdbarch *gdbarch, int regnum, |