From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25523 invoked by alias); 28 Nov 2006 18:09:27 -0000 Received: (qmail 25509 invoked by uid 22791); 28 Nov 2006 18:09:25 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 28 Nov 2006 18:09:17 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Gp7Ng-0001AE-TE for gdb-patches@sources.redhat.com; Tue, 28 Nov 2006 19:08:32 +0100 Received: from 73-198.umostel.ru ([82.179.73.198]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Nov 2006 19:08:32 +0100 Received: from ghost by 73-198.umostel.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Nov 2006 19:08:32 +0100 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: Language of registers Date: Tue, 28 Nov 2006 18:09:00 -0000 Message-ID: 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-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.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: 2006-11/txt/msg00338.txt.bz2 Daniel Jacobowitz wrote: > On Tue, Nov 28, 2006 at 08:04:11PM +0300, Vladimir Prus wrote: >> First of all, varobjs don't know anything about Ada. Further, unlike CLI, >> varobj don't have any language-specific formatting -- it's just tree of >> values. > > Sure there is. There isn't for structs or arrays, but I presume it > still calls the language specific routines for formatting e.g. > integers. And types. > > (gdb) set language ada > (gdb) interpreter-exec mi "-var-create - * $xmm0" > ^done,name="var1",numchild="7",type="builtin_type_vec128i" > (gdb) > (gdb) interpreter-exec mi "-var-list-children var1" > ^done,numchild="7",children=[child={name="var1.v4_float",exp="v4_float",numchild="4",type="array > (...) of > float"}, 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. >> 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. - Volodya