aboutsummaryrefslogtreecommitdiff
path: root/gdb/reggroups.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/reggroups.h')
-rw-r--r--gdb/reggroups.h32
1 files changed, 27 insertions, 5 deletions
diff --git a/gdb/reggroups.h b/gdb/reggroups.h
index 2f38b67..5f8a8a3 100644
--- a/gdb/reggroups.h
+++ b/gdb/reggroups.h
@@ -23,10 +23,36 @@
#define REGGROUPS_H
struct gdbarch;
-struct reggroup;
enum reggroup_type { USER_REGGROUP, INTERNAL_REGGROUP };
+/* Individual register group. */
+
+struct reggroup
+{
+ /* Create a new register group object. The NAME is not owned by the new
+ reggroup object, so must outlive the object. */
+ reggroup (const char *name, enum reggroup_type type)
+ : m_name (name),
+ m_type (type)
+ { /* Nothing. */ }
+
+ /* Return the name for this register group. */
+ const char *name () const
+ { return m_name; }
+
+ /* Return the type of this register group. */
+ enum reggroup_type type () const
+ { return m_type; }
+
+private:
+ /* The name of this register group. */
+ const char *m_name;
+
+ /* The type of this register group. */
+ enum reggroup_type m_type;
+};
+
/* Pre-defined, user visible, register groups. */
extern const reggroup *const general_reggroup;
extern const reggroup *const float_reggroup;
@@ -50,10 +76,6 @@ extern const reggroup *reggroup_gdbarch_new (struct gdbarch *gdbarch,
/* Add a register group (with attribute values) to the pre-defined list. */
extern void reggroup_add (struct gdbarch *gdbarch, const reggroup *group);
-/* Register group attributes. */
-extern const char *reggroup_name (const struct reggroup *reggroup);
-extern enum reggroup_type reggroup_type (const struct reggroup *reggroup);
-
/* Return the list of all register groups for GDBARCH. */
extern const std::vector<const reggroup *> &
gdbarch_reggroups (struct gdbarch *gdbarch);