/* Register groupings for GDB, the GNU debugger.
- Copyright (C) 2002, 2003, 2007, 2008, 2009, 2010
+ Copyright (C) 2002, 2003, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
Contributed by Red Hat.
reggroup_new (const char *name, enum reggroup_type type)
{
struct reggroup *group = XMALLOC (struct reggroup);
+
group->name = name;
group->type = type;
return group;
{
struct reggroups *groups = GDBARCH_OBSTACK_ZALLOC (gdbarch,
struct reggroups);
+
groups->last = &groups->first;
return groups;
}
/* Group name. */
{
const char *name;
+
if (group == NULL)
name = "Group";
else
/* Group type. */
{
const char *type;
+
if (group == NULL)
type = "Type";
else
{
struct cleanup *cleanups;
struct ui_file *file = gdb_fopen (args, "w");
+
if (file == NULL)
perror_with_name (_("maintenance print reggroups"));
cleanups = make_cleanup_ui_file_delete (file);