This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] New annotation for threads
> > This is just an annotation equivalent of Vladimir's patch for an observer
> > for new threads.
> I'd really like to have others' opinions on this one. I thought that
> we weren't going to change our annotations anymore. And even though
> we were not going to remove annotations for a while longer, we were
> going to focuse on MI instead.
It doesn't impede MI development, so you could think of it as orthogonal.
Clearly it can eventually be removed with the rest of annotations.
> The change is sufficiently small that I'm thinking, why not, but can't
> approve the suggestion just by myself.
I would just use it to notify Emacs that an application was multi-threaded and
display the selected thread number in the mode-line. It won't work if
Vladimir's patch is approved in it's original form (Apr 26: [RFA] Report the
main thread) but it now looks like any change made there will be just to
MI which won't affect this patch.
> Regarding the code itself:
> > 2008-04-18 Nick Roberts <email@example.com>
> > * annotate.h: (annotate_new_thread): New extern.
> > * annotate.c (annotate_new_thread): New function.
> > * thread.c (add_thread_with_info): Use it.
> How about creating a new observer for new_threads events instead of
> specifically calling an annotation function from "add_thread"? Seems
> much cleaner that way.
I'm not sure what you mean, or how I would register such an observer.
All other annotations are done this way and, unlike MI, annotations don't
have their own interpreter but just mark up CLI.