From d8fe84e397e20f56c5a240a72c9d2ee78a66e414 Mon Sep 17 00:00:00 2001 From: Elena Zannoni Date: Wed, 5 Nov 2003 23:50:12 +0000 Subject: [PATCH] 2003-11-05 Elena Zannoni * top.c (execute_command): Fix broken logic for command execution while inferior is running in async mode. --- gdb/ChangeLog | 5 +++++ gdb/top.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cd31bd8..e2b2bef 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-11-05 Elena Zannoni + + * top.c (execute_command): Fix broken logic for command execution + while inferior is running in async mode. + 2003-11-06 Mark Kettenis * dwarf2-frame.c (execute_cfa_program): Mark register as diff --git a/gdb/top.c b/gdb/top.c index 46e323b..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. */ -- 2.7.4