This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Is gdb script execution intended to work this way in async mode?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]