X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Finflow.c;h=2a41f57982ff71e6c15a9b0df868b63b4cef2a5d;hb=3c23e6fb7e41ca97c5e25921080f61b1be84d461;hp=526acdfdc7e20423adea999655d5374daf360698;hpb=b31da25ee58e2b01aa0c189474a277b443d94517;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/inflow.c b/gdb/inflow.c index 526acdfdc7..2a41f57982 100644 --- a/gdb/inflow.c +++ b/gdb/inflow.c @@ -35,22 +35,7 @@ #include #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 @@ -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); } }