From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6891 invoked by alias); 11 May 2008 21:10:32 -0000 Received: (qmail 6881 invoked by uid 22791); 11 May 2008 21:10:30 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.25) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 11 May 2008 21:10:03 +0000 Received: from kahikatea.snap.net.nz (141.31.255.123.static.snap.net.nz [123.255.31.141]) by viper.snap.net.nz (Postfix) with ESMTP id 96CFF3DA0B9; Mon, 12 May 2008 09:09:56 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id B72798FC6D; Mon, 12 May 2008 09:09:51 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18471.24734.936595.281750@kahikatea.snap.net.nz> Date: Sun, 11 May 2008 22:19:00 -0000 To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Report the main thread. In-Reply-To: <200805111845.32141.vladimir@codesourcery.com> References: <18469.39280.284106.858072@kahikatea.snap.net.nz> <200805111829.21105.vladimir@codesourcery.com> <18471.1355.909663.303640@kahikatea.snap.net.nz> <200805111845.32141.vladimir@codesourcery.com> X-Mailer: VM 7.19 under Emacs 22.2.50.2 X-IsSubscribed: yes 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/msg00366.txt.bz2 > > > 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. It's not specific to gdbthread.h but a general principle. Look at varobj.h. It just declares struct varobj (without it's members) which means that all the setters and getters (varobj_set/get_*) need to be defined in varobj.c for mi-cmd-var.c to access the members. I guess it's a poor man's data encapsulation. -- Nick http://www.inet.net.nz/~nickrob