This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH]: Update thread list
Michael Snyder wrote:
>
> Andrew Cagney wrote:
> >
> > Michael Snyder wrote:
> > >
> > > I can think of two times when it is both safe and useful
> > > for GDB to go query the target to find out if there are
> > > any new threads.
> > > 1) "info threads" and
> > > 2) "thread apply all xxx"
> > >
> > > This change adds the second (the first is already in place).
> >
> > Should this (and the other) call be wrapped in something that stops GDB
> > updating the thread list more than once? Doing a
> > target_find_new_threads() can get expensive and, assuming the target has
> > stopped, shouldn't change between each call.
> >
> > But you're the thread maintainer.
>
> Good idea, I guess. I'd wanna think about what "level" it
> belongs at. Should we have the core GDB maintain a "once" flag,
> or should we go ahead and call the target_find_new_threads
> function, and let the target decide? Certainly there may
> be future targets where "all-stop" is not true, and in that
> day there may be some "all-stop" targets and some "some-stop"
> ones.
For the moment, I think thread.c can handle it. Worry about the
problems of the target still running when someone gets that working.
Andrew