Is gdb script execution intended to work this way in async mode?
Doug Evans <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CADPb22T40jXhHOXiPG7jnHxTXrGEPm=vqZwFMFxGJ+1H4cNwbA@mail.gmail.com> |
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.