aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-08-04 20:34:10 +0000
committerAndrew Cagney <cagney@redhat.com>2003-08-04 20:34:10 +0000
commit6c7d17ba3a5d982ae1c2b972417aedce0f404cf5 (patch)
tree2608b73719576cc5a6c1aa63742969c4ded95f3c /gdb/infcmd.c
parent95cd630eaeeb7c59acb5129df8a18b808dfabe23 (diff)
downloadgdb-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/infcmd.c')
-rw-r--r--gdb/infcmd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index df7d950..6831d6b 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1677,24 +1677,24 @@ registers_info (char *addr_exp, int fpregs)
/* A register group? */
{
- struct reggroup *const *group;
- for (group = reggroups (current_gdbarch);
- (*group) != NULL;
- group++)
+ struct reggroup *group;
+ for (group = reggroup_next (current_gdbarch, NULL);
+ group != NULL;
+ group = reggroup_next (current_gdbarch, group))
{
/* Don't bother with a length check. Should the user
enter a short register group name, go with the first
group that matches. */
- if (strncmp (start, reggroup_name ((*group)), end - start) == 0)
+ if (strncmp (start, reggroup_name (group), end - start) == 0)
break;
}
- if ((*group) != NULL)
+ if (group != NULL)
{
int regnum;
for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
{
if (gdbarch_register_reggroup_p (current_gdbarch, regnum,
- (*group)))
+ group))
gdbarch_print_registers_info (current_gdbarch,
gdb_stdout, deprecated_selected_frame,
regnum, fpregs);