This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
filtering of commands during async operation
- From: "Newman, Mark (N-Superior Technical Resource Inc)" <mark dot newman at lmco dot com>
- To: gdb at sources dot redhat dot com
- Date: Wed, 05 Nov 2003 16:11:35 -0500
- Subject: filtering of commands during async operation
In top.c there is an attempt to filter what commands can be issued during async operation. That code is not filtering (at least under RH on an Intel box). The code is
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"))
error ("Cannot execute this command while the target is running.");
The code should be:
if (event_loop_p && target_can_async_p () && target_executing) {
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.");
}
}
Unless someone objects I am going to put in a bug report and a patch.
In addition I would like to set up a more flexible way of defining which commands are legal while target_executing == 1 and in async mode.
Mark Newman