summaryrefslogtreecommitdiff
path: root/gdb/regcache.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2008-10-30 20:35:29 +0000
committerTom Tromey <tromey@redhat.com>2008-10-30 20:35:29 +0000
commit8c2c39f7fcb89b215195a281dbeb6ded9f15eb21 (patch)
tree6ef7093365a2497204f9380521f7b242c0edcece /gdb/regcache.c
parent61b6510b32ffa769ae33c54432a74d89b772f713 (diff)
downloadgdb-8c2c39f7fcb89b215195a281dbeb6ded9f15eb21.tar.gz
* 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/regcache.c')
-rw-r--r--gdb/regcache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 616a6f71817..74ca6f069ff 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -1104,11 +1104,13 @@ regcache_print (char *args, enum regcache_dump_what what_to_dump)
regcache_dump (get_current_regcache (), gdb_stdout, what_to_dump);
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);
regcache_dump (get_current_regcache (), file, what_to_dump);
- ui_file_delete (file);
+ do_cleanups (cleanups);
}
}