From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9205 invoked by alias); 11 May 2008 14:45:49 -0000 Received: (qmail 9196 invoked by uid 22791); 11 May 2008 14:45:49 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 11 May 2008 14:45:24 +0000 Received: (qmail 28909 invoked from network); 11 May 2008 14:45:23 -0000 Received: from unknown (HELO localhost) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 May 2008 14:45:23 -0000 From: Vladimir Prus To: Nick Roberts Subject: Re: [RFA] Report the main thread. Date: Sun, 11 May 2008 16:41:00 -0000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) Cc: gdb-patches@sources.redhat.com References: <18469.39280.284106.858072@kahikatea.snap.net.nz> <200805111829.21105.vladimir@codesourcery.com> <18471.1355.909663.303640@kahikatea.snap.net.nz> In-Reply-To: <18471.1355.909663.303640@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200805111845.32141.vladimir@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-05/txt/msg00355.txt.bz2 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