diff options
author | Tom Tromey <tromey@redhat.com> | 2008-10-30 20:35:31 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2008-10-30 20:35:31 +0000 |
commit | 724b958c4168d40f59a35112c36ebf9e02c43d56 (patch) | |
tree | f2cd63b030da519b513a58be98a7c010e9464dcb /gdb/maint.c | |
parent | a05016c09e47a026bdbf05d02101c4eb40ac52f5 (diff) | |
download | binutils-724b958c4168d40f59a35112c36ebf9e02c43d56.zip binutils-724b958c4168d40f59a35112c36ebf9e02c43d56.tar.gz binutils-724b958c4168d40f59a35112c36ebf9e02c43d56.tar.bz2 |
* cli/cli-logging.c (handle_redirections): Make a cleanup.
* reggroups.c (maintenance_print_reggroups): Make a cleanup.
* regcache.c (regcache_print): Make a cleanup.
* maint.c (maintenance_print_architecture): Make a cleanup.
* dummy-frame.c (maintenance_print_dummy_frames): Make a cleanup.
Diffstat (limited to 'gdb/maint.c')
-rw-r--r-- | gdb/maint.c | 4 |
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); } } |