+/* Implementation of gdb.Architecture.registers (self, reggroup) -> Iterator.
+ Returns an iterator over register descriptors for registers in GROUP
+ within the architecture SELF. */
+
+static PyObject *
+archpy_registers (PyObject *self, PyObject *args, PyObject *kw)
+{
+ static const char *keywords[] = { "reggroup", NULL };
+ struct gdbarch *gdbarch = NULL;
+ const char *group_name = NULL;
+
+ /* Parse method arguments. */
+ if (!gdb_PyArg_ParseTupleAndKeywords (args, kw, "|s", keywords,
+ &group_name))
+ return NULL;
+
+ /* Extract the gdbarch from the self object. */
+ ARCHPY_REQUIRE_VALID (self, gdbarch);
+
+ return gdbpy_new_register_descriptor_iterator (gdbarch, group_name);
+}
+
+/* Implementation of gdb.Architecture.register_groups (self) -> Iterator.
+ Returns an iterator that will give up all valid register groups in the
+ architecture SELF. */
+
+static PyObject *
+archpy_register_groups (PyObject *self, PyObject *args)
+{
+ struct gdbarch *gdbarch = NULL;
+
+ /* Extract the gdbarch from the self object. */
+ ARCHPY_REQUIRE_VALID (self, gdbarch);
+ return gdbpy_new_reggroup_iterator (gdbarch);
+}
+
+void _initialize_py_arch ();
+void
+_initialize_py_arch ()
+{
+ arch_object_data = gdbarch_data_register_post_init (arch_object_data_init);
+}
+