diff options
Diffstat (limited to 'gdb/regcache.c')
-rw-r--r-- | gdb/regcache.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/regcache.c b/gdb/regcache.c index 9d28aa2..eed1bd8 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -1498,14 +1498,11 @@ 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"); + stdio_file file; - if (file == NULL) + if (!file.open (args, "w")) perror_with_name (_("maintenance print architecture")); - cleanups = make_cleanup_ui_file_delete (file); - regcache_dump (get_current_regcache (), file, what_to_dump); - do_cleanups (cleanups); + regcache_dump (get_current_regcache (), &file, what_to_dump); } } |