gdb/reggroups.h - gdb

Data types defined

Macros defined

Source code

  1. /* Register groupings for GDB, the GNU debugger.

  2.    Copyright (C) 2002-2015 Free Software Foundation, Inc.

  3.    Contributed by Red Hat.

  4.    This file is part of GDB.

  5.    This program is free software; you can redistribute it and/or modify
  6.    it under the terms of the GNU General Public License as published by
  7.    the Free Software Foundation; either version 3 of the License, or
  8.    (at your option) any later version.

  9.    This program is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU General Public License for more details.

  13.    You should have received a copy of the GNU General Public License
  14.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  15. #ifndef REGGROUPS_H
  16. #define REGGROUPS_H

  17. struct gdbarch;
  18. struct reggroup;

  19. enum reggroup_type { USER_REGGROUP, INTERNAL_REGGROUP };

  20. /* Pre-defined, user visible, register groups.  */
  21. extern struct reggroup *const general_reggroup;
  22. extern struct reggroup *const float_reggroup;
  23. extern struct reggroup *const system_reggroup;
  24. extern struct reggroup *const vector_reggroup;
  25. extern struct reggroup *const all_reggroup;

  26. /* Pre-defined, internal, register groups.  */
  27. extern struct reggroup *const save_reggroup;
  28. extern struct reggroup *const restore_reggroup;

  29. /* Create a new local register group.  */
  30. extern struct reggroup *reggroup_new (const char *name,
  31.                                       enum reggroup_type type);

  32. /* Add a register group (with attribute values) to the pre-defined list.  */
  33. extern void reggroup_add (struct gdbarch *gdbarch, struct reggroup *group);

  34. /* Register group attributes.  */
  35. extern const char *reggroup_name (struct reggroup *reggroup);
  36. extern enum reggroup_type reggroup_type (struct reggroup *reggroup);

  37. /* Interator for the architecture's register groups.  Pass in NULL,
  38.    returns the first group.  Pass in a group, returns the next group,
  39.    or NULL when the last group is reached.  */
  40. extern struct reggroup *reggroup_next (struct gdbarch *gdbarch,
  41.                                        struct reggroup *last);

  42. /* Is REGNUM a member of REGGROUP?  */
  43. extern int default_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
  44.                                         struct reggroup *reggroup);

  45. #endif