A Wednesday 25 June 2008 20:44:09, Daniel Jacobowitz wrote: > On Sun, Jun 15, 2008 at 10:05:16PM +0100, Pedro Alves wrote: > > It is also needed to have support to interrupt/suspend a simple > > thread so a new target_stop_ptid method was added to request > > the target to interrupt a single thread. > > How about adding a ptid argument to to_stop instead? I think the code > will be shared in most cases. Here it is, then. > > > @@ -1810,11 +1847,16 @@ handle_inferior_event (struct execution_ > > && ecs->ws.kind != TARGET_WAITKIND_SIGNALLED && > > ecs->new_thread_event) add_thread (ecs->ptid); > > > > - /* Mark all threads as not-executing. In non-stop, this should be > > - adjusted to only mark ecs->ptid. */ > > - if (ecs->ws.kind != TARGET_WAITKIND_IGNORE > > - && stop_soon != STOP_QUIETLY) > > - set_executing (pid_to_ptid (-1), 0); > > + if (ecs->ws.kind != TARGET_WAITKIND_IGNORE) > > + { > > + /* Mark the stopped threads accordingly. */ > > + if (!non_stop > > + || ecs->ws.kind == TARGET_WAITKIND_EXITED > > + || ecs->ws.kind == TARGET_WAITKIND_SIGNALLED) > > + set_executing (pid_to_ptid (-1), 0); > > + else > > + set_executing (ecs->ptid, 0); > > + } > > > > switch (ecs->ws.kind) > > { > > Are we going to miss the stop_soon check here? AFAICT, we're not. I dropped it in the patch that was introducing it. > > - add_prefix_cmd ("thread", class_run, thread_command, _("\ > > + c = add_prefix_cmd ("thread", class_run, thread_command, _("\ > > Use this command to switch between threads.\n\ > > The new thread ID must be currently known."), > > &thread_cmd_list, "thread ", 1, &cmdlist); > > Indentation on that last line. > > Otherwise OK. Thanks. Updated patch adds a ptid_t argument to target_stop, and fixes enough targets to build on linux. Patch to update all other targets to the new target_stop interface comming up. Nothing else changed. Still OK, in combination with the next patch (7.2)? -- Pedro Alves