diff options
Diffstat (limited to 'gdb/reggroups.c')
-rw-r--r-- | gdb/reggroups.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/reggroups.c b/gdb/reggroups.c index 693b378d876..ae7d4ceeb72 100644 --- a/gdb/reggroups.c +++ b/gdb/reggroups.c @@ -270,14 +270,11 @@ maintenance_print_reggroups (char *args, int from_tty) reggroups_dump (gdbarch, gdb_stdout); else { - struct cleanup *cleanups; - struct ui_file *file = gdb_fopen (args, "w"); + stdio_file file; - if (file == NULL) + if (!file.open (args, "w")) perror_with_name (_("maintenance print reggroups")); - cleanups = make_cleanup_ui_file_delete (file); - reggroups_dump (gdbarch, file); - do_cleanups (cleanups); + reggroups_dump (gdbarch, &file); } } |