15796c8dcSSimon Schubert /* Register groupings for GDB, the GNU debugger. 25796c8dcSSimon Schubert 3*ef5ccd6cSJohn Marino Copyright (C) 2002-2013 Free Software Foundation, Inc. 45796c8dcSSimon Schubert 55796c8dcSSimon Schubert Contributed by Red Hat. 65796c8dcSSimon Schubert 75796c8dcSSimon Schubert This file is part of GDB. 85796c8dcSSimon Schubert 95796c8dcSSimon Schubert This program is free software; you can redistribute it and/or modify 105796c8dcSSimon Schubert it under the terms of the GNU General Public License as published by 115796c8dcSSimon Schubert the Free Software Foundation; either version 3 of the License, or 125796c8dcSSimon Schubert (at your option) any later version. 135796c8dcSSimon Schubert 145796c8dcSSimon Schubert This program is distributed in the hope that it will be useful, 155796c8dcSSimon Schubert but WITHOUT ANY WARRANTY; without even the implied warranty of 165796c8dcSSimon Schubert MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 175796c8dcSSimon Schubert GNU General Public License for more details. 185796c8dcSSimon Schubert 195796c8dcSSimon Schubert You should have received a copy of the GNU General Public License 205796c8dcSSimon Schubert along with this program. If not, see <http://www.gnu.org/licenses/>. */ 215796c8dcSSimon Schubert 225796c8dcSSimon Schubert #ifndef REGGROUPS_H 235796c8dcSSimon Schubert #define REGGROUPS_H 245796c8dcSSimon Schubert 255796c8dcSSimon Schubert struct gdbarch; 265796c8dcSSimon Schubert struct reggroup; 275796c8dcSSimon Schubert 285796c8dcSSimon Schubert enum reggroup_type { USER_REGGROUP, INTERNAL_REGGROUP }; 295796c8dcSSimon Schubert 305796c8dcSSimon Schubert /* Pre-defined, user visible, register groups. */ 315796c8dcSSimon Schubert extern struct reggroup *const general_reggroup; 325796c8dcSSimon Schubert extern struct reggroup *const float_reggroup; 335796c8dcSSimon Schubert extern struct reggroup *const system_reggroup; 345796c8dcSSimon Schubert extern struct reggroup *const vector_reggroup; 355796c8dcSSimon Schubert extern struct reggroup *const all_reggroup; 365796c8dcSSimon Schubert 375796c8dcSSimon Schubert /* Pre-defined, internal, register groups. */ 385796c8dcSSimon Schubert extern struct reggroup *const save_reggroup; 395796c8dcSSimon Schubert extern struct reggroup *const restore_reggroup; 405796c8dcSSimon Schubert 415796c8dcSSimon Schubert /* Create a new local register group. */ 425796c8dcSSimon Schubert extern struct reggroup *reggroup_new (const char *name, 435796c8dcSSimon Schubert enum reggroup_type type); 445796c8dcSSimon Schubert 455796c8dcSSimon Schubert /* Add a register group (with attribute values) to the pre-defined list. */ 465796c8dcSSimon Schubert extern void reggroup_add (struct gdbarch *gdbarch, struct reggroup *group); 475796c8dcSSimon Schubert 485796c8dcSSimon Schubert /* Register group attributes. */ 495796c8dcSSimon Schubert extern const char *reggroup_name (struct reggroup *reggroup); 505796c8dcSSimon Schubert extern enum reggroup_type reggroup_type (struct reggroup *reggroup); 515796c8dcSSimon Schubert 525796c8dcSSimon Schubert /* Interator for the architecture's register groups. Pass in NULL, 535796c8dcSSimon Schubert returns the first group. Pass in a group, returns the next group, 545796c8dcSSimon Schubert or NULL when the last group is reached. */ 555796c8dcSSimon Schubert extern struct reggroup *reggroup_next (struct gdbarch *gdbarch, 565796c8dcSSimon Schubert struct reggroup *last); 575796c8dcSSimon Schubert 585796c8dcSSimon Schubert /* Is REGNUM a member of REGGROUP? */ 595796c8dcSSimon Schubert extern int default_register_reggroup_p (struct gdbarch *gdbarch, int regnum, 605796c8dcSSimon Schubert struct reggroup *reggroup); 615796c8dcSSimon Schubert 625796c8dcSSimon Schubert #endif 63