This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Report the main thread.
On Sunday 11 May 2008 18:40:11 Nick Roberts wrote:
> > > Currently the new_thread observer only declares struct thread_info
> >
> > What do you mean? The observer does not declare struct thread_info, it
> > declares a parameter having type 'struct thread_info'.
>
> struct thread_info is declared in observer.h (through observer.sh) which
> is included in annotate.c
Well, that's just forward/incomplete declaration, which presumably is used
(as opposed to including all the necessary headers), just to reduce compile
time. Modules that register observers need to #include necessary headers
to use the parameters.
> > > and not it's
> > > members so I can't identify the thread number in annotate.c
> >
> > struct thread_info is defined in gdbthread.h. What prevents you from
> > including that header?
>
> I think the idea is not to expose the internals to other parts of the code.
There's nothing in gdbthread.h to indicate that, I think.
- Volodya