Remove make_cleanup_restore_target_terminal
[deliverable/binutils-gdb.git] / gdb / tui / tui-hooks.c
index acb63812a4d4a7c82a990849f27a3ab7d788265b..2dd1bc02d04a1cf261502c52085df54fe522b96b 100644 (file)
@@ -118,14 +118,13 @@ tui_refresh_frame_and_register_information (int registers_too_p)
 {
   struct frame_info *fi;
   CORE_ADDR pc;
-  struct cleanup *old_chain;
   int frame_info_changed_p;
 
   if (!has_stack_frames ())
     return;
 
-  old_chain = make_cleanup_restore_target_terminal ();
-  target_terminal_ours_for_output ();
+  target_terminal::scoped_restore_terminal_state term_state;
+  target_terminal::ours_for_output ();
 
   fi = get_selected_frame (NULL);
   /* Ensure that symbols for this frame are read in.  Also, determine
@@ -156,8 +155,6 @@ tui_refresh_frame_and_register_information (int registers_too_p)
       tui_check_data_values (fi);
       tui_refreshing_registers = 0;
     }
-
-  do_cleanups (old_chain);
 }
 
 /* Dummy callback for deprecated_print_frame_info_listing_hook which is called
This page took 0.025847 seconds and 4 git commands to generate.