Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Is gdb script execution intended to work this way in async mode?
@ 2014-03-22  0:13 Doug Evans
  2014-03-24 20:04 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2014-03-22  0:13 UTC (permalink / raw)
  To: gdb

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-25 11:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-22  0:13 Is gdb script execution intended to work this way in async mode? Doug Evans
2014-03-24 20:04 ` Pedro Alves
2014-03-25 11:46   ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox