gdb: defer commit resume until all available events are consumed
This patch makes GDB defer commit resume when handling a sequence of
target events.
In fetch_inferior_event, a scoped_restore object is instantiated (if
it's not already) to set the defer_commit_resume flag. Any resumption
that is the result of handling that event will therefore not be
committed.
If there are other events immediatly consumable, they'll all be handled
while the "defer commit resume flag" is set. Once do_target_wait returns
false, we know that we have consumed all immediatly available events,
then the "defer commit resume" flag is reset and a commit resume is
issued.
After having handled an event in fetch_inferior_event, we call
mark_infrun_async_event_handler to make sure that fetch_inferior_event
gets called at least once more, to get that final call where
do_target_wait returns no event.
Change-Id: I18112ba19a1ff4986530c660f530d847bb4a1f1d
This page took 0.024219 seconds and 4 git commands to generate.