This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

read_command_lines should reset control_level


Since control_level is a static variable it is impossible for all callers
of read_command_lines to reset it.


1999-02-02  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

	* top.c (read_command_lines): Reset control_level.
	(define_command): Don't do it here.

--- gdb-19990121/gdb/top.c.~1~	Sat Jan 23 16:14:04 1999
+++ gdb-19990121/gdb/top.c	Tue Feb  2 09:27:01 1999
@@ -2466,6 +2466,7 @@
   enum command_control_type ret;
   enum misc_command_type val;
 
+  control_level = 0;
   if (readline_begin_hook)
     {
       /* Note - intentional to merge messages with no newline */
@@ -2764,7 +2765,6 @@
   for (tem = comname; *tem; tem++)
     if (isupper(*tem)) *tem = tolower(*tem);
 
-  control_level = 0;
   sprintf (tmpbuf, "Type commands for definition of \"%s\".", comname);
   cmds = read_command_lines (tmpbuf, from_tty);