From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29170 invoked by alias); 1 Dec 2006 14:32:32 -0000 Received: (qmail 29159 invoked by uid 22791); 1 Dec 2006 14:32:30 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 01 Dec 2006 14:32:22 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1Gq9R5-0006m7-SX for gdb-patches@sourceware.org; Fri, 01 Dec 2006 09:32:19 -0500 Date: Fri, 01 Dec 2006 14:32:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: Language of registers Message-ID: <20061201143219.GA25854@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <200611251421.43173.vladimir@codesourcery.com> <20061127140344.GA32528@nevyn.them.org> <200611282004.11537.vladimir@codesourcery.com> <20061128172327.GG21834@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) 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: 2006-12/txt/msg00002.txt.bz2 On Tue, Nov 28, 2006 at 09:07:52PM +0300, Vladimir Prus wrote: > What I said ("varobjs don't know anything about Ada") is still true, > though ;-) > > There are two completely independent languages. One language is that used to > values and types -- the one changed by "set language". The type output > above comes from "type_print", that just calls LA_PRINT_TYPE, which is just > wrapper over current_language->la_print_type. > > On the other hand, varobj->root->lang is internal to varobj.c -- it selects > which of language specific function inside varobj.c itself are called > later. I don't think that's accurate. They're not independent. var->root->lang is set from var->root->exp->language_defn, which is captured from the global current language when the expression is parsed. Having -var-create do something magically different for registers is strange and confusing. Maybe, if the patch to automatically create varobjs for registers goes in, that new command should always use language_c? > >> The change does not seem very complex, but the changes to testcases will > >> be huge, so I'd like to check. Does everybody agree with removing > >> "public" pseudo-field from structures that have only public fields? > > > > We can't tell reliably if something was declared as "struct" or "class" > > in the source, but I think unions default to public, don't they? > > The *default* to public, but you can have private members in a union. That's what I meant. We can see "oh, this is a union" -> "its default is public". We don't know for sure if a source construct was "struct" (public by default) or "class", though. But it sounds like we can't remove the public child now anyway. -- Daniel Jacobowitz CodeSourcery