[Bug threads/19471] unexpected stop in multi-inferior debugging

palves at redhat dot com sourceware-bugzilla@sourceware.org
Mon Aug 21 20:19:00 GMT 2017


https://sourceware.org/bugzilla/show_bug.cgi?id=19471

--- Comment #9 from Pedro Alves <palves at redhat dot com> ---
> That was the wrong patch, but it has the bits from the earlier missing
> patch in the context, so you can reconstruct it ok from there.

Actually, I'm confused on what would the patch look like.

In all-stop (not fake all-stop-on-top-of-non-stop, e.g., against gdbserver), we
need to issue one resume only, because once you send a resume request to the
target, you can't send another until the target stops again.

I don't think you should be calling target_resume at that level.  It bypasses
layers of thread-is-resumed state private to infrun.  You should probably be
calling resume or keep_going.  If an inferior exited while we were trying to
step some thread of another inferior, we need to switch back to that thread
instead of some other random thread.  That's why you see several:

      if (!switch_back_to_stepped_thread (ecs))
        keep_going (ecs);

in infrun.c.  In this case, we probably need to do something like:

      if (!switch_back_to_stepped_thread (ecs))
        {
           // pick any random live thread and switch to it.
           keep_going (ecs);
        }
      return;

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list