From 6c7d17ba3a5d982ae1c2b972417aedce0f404cf5 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Mon, 4 Aug 2003 20:34:10 +0000 Subject: 2003-08-04 Andrew Cagney * 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. --- gdb/infcmd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gdb/infcmd.c') 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); -- cgit v1.1