/* The register group that the user is iterating over. This will never
be NULL. */
- struct reggroup *reggroup;
+ const struct reggroup *reggroup;
/* The next register number to lookup. Starts at 0 and counts up. */
int regnum;
PyObject_HEAD
/* The last register group returned. Initially this will be NULL. */
- struct reggroup *reggroup;
+ const struct reggroup *reggroup;
/* Pointer back to the architecture we're finding registers for. */
struct gdbarch *gdbarch;
PyObject_HEAD
/* The register group being described. */
- struct reggroup *reggroup;
+ const struct reggroup *reggroup;
};
extern PyTypeObject reggroup_object_type
returned for the same REGGROUP pointer. */
static gdbpy_ref<>
-gdbpy_get_reggroup (struct reggroup *reggroup)
+gdbpy_get_reggroup (const reggroup *reggroup)
{
/* Map from GDB's internal reggroup objects to the Python representation.
GDB's reggroups are global, and are never deleted, so using a map like
this is safe. */
- static std::unordered_map<struct reggroup *,gdbpy_ref<>>
+ static std::unordered_map<const struct reggroup *,gdbpy_ref<>>
gdbpy_reggroup_object_map;
/* If there is not already a suitable Python object in the map then
gdbpy_reggroup_to_string (PyObject *self)
{
reggroup_object *group = (reggroup_object *) self;
- struct reggroup *reggroup = group->reggroup;
+ const reggroup *reggroup = group->reggroup;
const char *name = reggroup_name (reggroup);
return PyUnicode_FromString (name);
= (reggroup_iterator_object *) self;
struct gdbarch *gdbarch = iter_obj->gdbarch;
- struct reggroup *next_group = reggroup_next (gdbarch, iter_obj->reggroup);
+ const reggroup *next_group = reggroup_next (gdbarch, iter_obj->reggroup);
if (next_group == NULL)
{
PyErr_SetString (PyExc_StopIteration, _("No more groups"));
gdbpy_new_register_descriptor_iterator (struct gdbarch *gdbarch,
const char *group_name)
{
- struct reggroup *grp = NULL;
+ const reggroup *grp = NULL;
/* Lookup the requested register group, or find the default. */
if (group_name == NULL || *group_name == '\0')