aboutsummaryrefslogtreecommitdiff
path: root/gdb/maint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/maint.c')
-rw-r--r--gdb/maint.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/maint.c b/gdb/maint.c
index e64d4fe..365e374 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -414,11 +414,13 @@ maintenance_print_architecture (char *args, int from_tty)
gdbarch_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 architecture"));
+ cleanups = make_cleanup_ui_file_delete (file);
gdbarch_dump (current_gdbarch, file);
- ui_file_delete (file);
+ do_cleanups (cleanups);
}
}