aboutsummaryrefslogtreecommitdiff
path: root/gdb/maint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/maint.c')
-rw-r--r--gdb/maint.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/maint.c b/gdb/maint.c
index 77b56af..d95f658 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -403,14 +403,11 @@ maintenance_print_architecture (char *args, int from_tty)
gdbarch_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 architecture"));
- cleanups = make_cleanup_ui_file_delete (file);
- gdbarch_dump (gdbarch, file);
- do_cleanups (cleanups);
+ gdbarch_dump (gdbarch, &file);
}
}