aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2003-11-05 23:50:12 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2003-11-05 23:50:12 +0000
commitd8fe84e397e20f56c5a240a72c9d2ee78a66e414 (patch)
treec2a38513895f0fa64516eb257f1b9f74aa2a93a2 /gdb/top.c
parentcbdfc7c029fe3dfed60580245332f53271842eba (diff)
downloadgdb-d8fe84e397e20f56c5a240a72c9d2ee78a66e414.zip
gdb-d8fe84e397e20f56c5a240a72c9d2ee78a66e414.tar.gz
gdb-d8fe84e397e20f56c5a240a72c9d2ee78a66e414.tar.bz2
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.
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/top.c b/gdb/top.c
index 46e323b0..baad701 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -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. */