2009-06-23 Sami Wagiaalla <swagiaal@redhat.com>
[deliverable/binutils-gdb.git] / gdb / reggroups.c
index 63954f683e0c06b945ac4ae95a8b2c5d601a460e..080342206cbbaaaf2418af88e1171d5f8a4cdc42 100644 (file)
@@ -1,6 +1,6 @@
 /* Register groupings for GDB, the GNU debugger.
 
-   Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    Contributed by Red Hat.
 
@@ -234,11 +234,13 @@ maintenance_print_reggroups (char *args, int from_tty)
     reggroups_dump (current_gdbarch, gdb_stdout);
   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);
       reggroups_dump (current_gdbarch, file);    
-      ui_file_delete (file);
+      do_cleanups (cleanups);
     }
 }
 
This page took 0.023641 seconds and 4 git commands to generate.