* disasm.c (gdb_disassemble_info): Initialize disassemble_info
[deliverable/binutils-gdb.git] / gdb / inflow.c
index 526acdfdc7e20423adea999655d5374daf360698..2a41f57982ff71e6c15a9b0df868b63b4cef2a5d 100644 (file)
 #include <sys/select.h>
 #endif
 
-#ifdef HAVE_TERMIOS
-#define PROCESS_GROUP_TYPE pid_t
-#endif
-
-#ifdef HAVE_TERMIO
-#define PROCESS_GROUP_TYPE int
-#endif
-
-#ifdef HAVE_SGTTY
-#ifdef SHORT_PGRP
-/* This is only used for the ultra.  Does it have pid_t?  */
-#define PROCESS_GROUP_TYPE short
-#else
-#define PROCESS_GROUP_TYPE int
-#endif
-#endif /* sgtty */
+#include "inflow.h"
 
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
@@ -200,6 +185,23 @@ terminal_init_inferior_with_pgrp (int pgrp)
     }
 }
 
+/* Save the terminal settings again.  This is necessary for the TUI
+   when it switches to TUI or non-TUI mode;  curses changes the terminal
+   and gdb must be able to restore it correctly.  */
+
+void
+terminal_save_ours (void)
+{
+  if (gdb_has_a_terminal ())
+    {
+      /* We could just as well copy our_ttystate (if we felt like adding
+         a new function serial_copy_tty_state).  */
+      if (our_ttystate)
+        xfree (our_ttystate);
+      our_ttystate = serial_get_tty_state (stdin_serial);
+    }
+}
+
 void
 terminal_init_inferior (void)
 {
@@ -591,11 +593,11 @@ kill_command (char *arg, int from_tty)
   if (target_has_stack)
     {
       printf_filtered ("In %s,\n", target_longname);
-      if (selected_frame == NULL)
+      if (deprecated_selected_frame == NULL)
        fputs_filtered ("No selected stack frame.\n", gdb_stdout);
       else
-       print_stack_frame (selected_frame,
-                          frame_relative_level (selected_frame), 1);
+       print_stack_frame (deprecated_selected_frame,
+                          frame_relative_level (deprecated_selected_frame), 1);
     }
 }
 \f
This page took 0.025015 seconds and 4 git commands to generate.