GDB 6.6 branch FROZEN

H. J. Lu hjl@lucon.org
Sat Dec 2 17:56:00 GMT 2006


On Sat, Dec 02, 2006 at 09:46:13AM -0800, Joel Brobecker wrote:
> Hello everyone,
> 
> please avoid any checkins on the gdb-6.6 branch, as I'm preparing
> the first release candidate...

Any possibility to fix the regression from gdb 6.4, PR tui/2173?
I am enclosing the patch here.


H.J.
----
Index: readline/readline.c
===================================================================
RCS file: /cvs/src/src/readline/readline.c,v
retrieving revision 1.10
diff -u -p -r1.10 readline.c
--- readline/readline.c	5 May 2006 18:26:12 -0000	1.10
+++ readline/readline.c	22 Nov 2006 19:40:17 -0000
@@ -295,6 +295,7 @@ readline (prompt)
      const char *prompt;
 {
   char *value;
+  int in_callback;
 
   /* If we are at EOF return a NULL string. */
   if (rl_pending_input == EOF)
@@ -303,6 +304,13 @@ readline (prompt)
       return ((char *)NULL);
     }
 
+  /* When we call readline, we have to make sure that readline isn't in
+     the callback state. Otherwise, it will get really confused.
+     PR gdb tui/2173.  */
+  in_callback = RL_ISSTATE (RL_STATE_CALLBACK);
+  if (in_callback)
+    RL_UNSETSTATE (RL_STATE_CALLBACK);
+
   rl_set_prompt (prompt);
 
   rl_initialize ();
@@ -321,6 +329,9 @@ readline (prompt)
   rl_clear_signals ();
 #endif
 
+  if (in_callback)
+    RL_SETSTATE (RL_STATE_CALLBACK);
+
   return (value);
 }
 



More information about the Gdb mailing list