diff options
Diffstat (limited to 'gdb/terminal.h')
-rw-r--r-- | gdb/terminal.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb/terminal.h b/gdb/terminal.h index 54e5e98..87a1aee 100644 --- a/gdb/terminal.h +++ b/gdb/terminal.h @@ -19,6 +19,8 @@ #ifndef GDB_TERMINAL_H #define GDB_TERMINAL_H +#include "serial.h" + struct inferior; extern void new_tty_prefork (std::string ttyname); @@ -43,4 +45,23 @@ extern void gdb_save_tty_state (void); have had a chance to alter it. */ extern void set_initial_gdb_ttystate (void); +/* Restore initial tty state. */ +extern void restore_initial_gdb_ttystate (void); + +/* An RAII-based object that saves the tty state, and then restores it again + when this object is destroyed. */ +class scoped_gdb_ttystate +{ +public: + scoped_gdb_ttystate (); + ~scoped_gdb_ttystate (); +private: + serial_ttystate m_ttystate; +}; + +#ifdef USE_WIN32API +/* Set translation mode of stdout/stderr to binary. */ +extern void set_output_translation_mode_binary (); +#endif + #endif /* GDB_TERMINAL_H */ |