keiths / rpms / gdb

Forked from rpms/gdb 2 days ago
Clone
955cd49
2005-02-14  Jeff Johnston <jjohnstn@redhat.com>
955cd49
955cd49
	* top.c (gdb_readline_wrapper): Ensure terminal is gdb's before calling
955cd49
	readline.
955cd49
eb9d945
2007-10-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
eb9d945
eb9d945
	Port to GDB-6.7.
eb9d945
eb9d945
Index: gdb-6.7/gdb/top.c
9231e41
===================================================================
eb9d945
--- gdb-6.7.orig/gdb/top.c	2007-09-02 23:13:56.000000000 +0200
eb9d945
+++ gdb-6.7/gdb/top.c	2007-10-14 23:38:27.000000000 +0200
eb9d945
@@ -795,6 +795,14 @@ gdb_readline_wrapper (char *prompt)
eb9d945
 
eb9d945
   back_to = make_cleanup (gdb_readline_wrapper_cleanup, cleanup);
955cd49
 
955cd49
+  /* Before calling readline, ensure we have the terminal.  If we don't
955cd49
+     have the terminal and call readline, we risk the possibility of
955cd49
+     gdb being thrown into the background.  This problem occurs when
955cd49
+     we attach to a background process on the same terminal the background
955cd49
+     process was started from and then perform some action which requires
955cd49
+     a page break prompt.  */
955cd49
+  terminal_ours ();
955cd49
+
eb9d945
   /* Display our prompt and prevent double prompt display.  */
eb9d945
   display_gdb_prompt (prompt);
eb9d945
   rl_already_prompted = 1;