This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Is gdb script execution intended to work this way in async mode?
- From: Doug Evans <dje at google dot com>
- To: gdb <gdb at sourceware dot org>
- Date: Fri, 21 Mar 2014 17:13:10 -0700
- Subject: Is gdb script execution intended to work this way in async mode?
- Authentication-results: sourceware.org; auth=none
Hi.
If I source a script in target-async mode, non-asynchronous execution
commands "finish" immediately in the sense that the following command
in the script is done before the previous command has completed (in
the expected sense - the command completes immediately, so to speak,
but continuations are registered to perform the rest of the command,
e.g. to keep stepping until a "next" has fully completed).
I hope this is a bug.
int
main ()
{
while (1)
sleep (1);
}
set target-async on
file a.out
start
source foo.gdb
foo.gdb:
next
next
-->
foo.gdb:2: Error in sourced command file:
Cannot execute this command while the selected thread is running.
Turn on the following for better visualization:
set debug infrun 1
set trace-commands on
The second "next" command is executed before the continuations that
implement the completion of the previous "next" command have, umm,
completed.