This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] top.c: fix broken logic for async


See the thread:
http://sources.redhat.com/ml/gdb/2003-11/msg00040.html

committed.

elena
2003-11-05  Elena Zannoni  <ezannoni@redhat.com>

       * top.c (execute_command): Fix broken logic for command execution
       while inferior is running in async mode.

Index: top.c
===================================================================
RCS file: /cvs/uberbaum/gdb/top.c,v
retrieving revision 1.82
diff -u -p -r1.82 top.c
--- top.c       22 Oct 2003 21:39:09 -0000      1.82
+++ top.c       5 Nov 2003 23:42:19 -0000
@@ -669,10 +669,10 @@ execute_command (char *p, int from_tty)
       /* If the target is running, we allow only a limited set of
          commands. */
       if (event_loop_p && target_can_async_p () && target_executing)
-       if (!strcmp (c->name, "help")
-           && !strcmp (c->name, "pwd")
-           && !strcmp (c->name, "show")
-           && !strcmp (c->name, "stop"))
+       if (strcmp (c->name, "help") != 0
+           && strcmp (c->name, "pwd") != 0
+           && strcmp (c->name, "show") != 0
+           && strcmp (c->name, "stop") != 0)
          error ("Cannot execute this command while the target is running.");
  
       /* Pass null arg rather than an empty one.  */


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