aboutsummaryrefslogtreecommitdiff
path: root/gdb/reggroups.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2010-05-16 21:11:14 +0000
committerMichael Snyder <msnyder@vmware.com>2010-05-16 21:11:14 +0000
commit123f5f96b6f084af89436ac1efaf7b77ab66bbe5 (patch)
tree1a1404dc4f92f1e55533e57584b9f35aa43628b0 /gdb/reggroups.c
parenta744cf537ec1cf2e102bc63b83b820cd4dd48783 (diff)
downloadgdb-123f5f96b6f084af89436ac1efaf7b77ab66bbe5.zip
gdb-123f5f96b6f084af89436ac1efaf7b77ab66bbe5.tar.gz
gdb-123f5f96b6f084af89436ac1efaf7b77ab66bbe5.tar.bz2
2010-05-16 Michael Snyder <msnyder@vmware.com>
* record.c: White space. * regcache.c: White space. * reggroups.c: White space. * remote-fileio.c: White space. * remote-m32r-sdi.c: White space. * remote-mips.c: White space. * remote-sim.c: White space.
Diffstat (limited to 'gdb/reggroups.c')
-rw-r--r--gdb/reggroups.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/reggroups.c b/gdb/reggroups.c
index 01dbe34..fdc0575 100644
--- a/gdb/reggroups.c
+++ b/gdb/reggroups.c
@@ -41,6 +41,7 @@ struct reggroup *
reggroup_new (const char *name, enum reggroup_type type)
{
struct reggroup *group = XMALLOC (struct reggroup);
+
group->name = name;
group->type = type;
return group;
@@ -81,6 +82,7 @@ reggroups_init (struct gdbarch *gdbarch)
{
struct reggroups *groups = GDBARCH_OBSTACK_ZALLOC (gdbarch,
struct reggroups);
+
groups->last = &groups->first;
return groups;
}
@@ -190,6 +192,7 @@ reggroups_dump (struct gdbarch *gdbarch, struct ui_file *file)
/* Group name. */
{
const char *name;
+
if (group == NULL)
name = "Group";
else
@@ -200,6 +203,7 @@ reggroups_dump (struct gdbarch *gdbarch, struct ui_file *file)
/* Group type. */
{
const char *type;
+
if (group == NULL)
type = "Type";
else
@@ -240,6 +244,7 @@ maintenance_print_reggroups (char *args, int from_tty)
{
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);