From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11769 invoked by alias); 16 Oct 2011 15:04:15 -0000 Received: (qmail 11756 invoked by uid 22791); 16 Oct 2011 15:04:13 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ey0-f169.google.com (HELO mail-ey0-f169.google.com) (209.85.215.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 16 Oct 2011 15:03:59 +0000 Received: by eye4 with SMTP id 4so2554147eye.0 for ; Sun, 16 Oct 2011 08:03:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.14.24.35 with SMTP id w35mr863497eew.128.1318777437958; Sun, 16 Oct 2011 08:03:57 -0700 (PDT) Received: by 10.14.48.67 with HTTP; Sun, 16 Oct 2011 08:03:57 -0700 (PDT) In-Reply-To: <1318410569.25241.55.camel@feddie.cnoc.lan> References: <1318410569.25241.55.camel@feddie.cnoc.lan> Date: Sun, 16 Oct 2011 22:12:00 -0000 Message-ID: Subject: Re: Best way to work with settings that apply to a file (or dwarf cu) From: Daniel Jacobowitz To: Joost van der Sluis Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00156.txt.bz2 On Wed, Oct 12, 2011 at 5:09 AM, Joost van der Sluis wrote: > On the other hand, I saw that this same problem also applies to the > language of a symbol. But instead of querying the symtab for the > language, the symbol has a field called language, which is set for each > symbol within a compilation-unit. (For Dwarf) > > ie: all symbols do have a language setting. But for all symbols within > one symtab this setting is the same. Wouldn't it be easier to add a link > in each symbol to it's symtab, and store the language there? (This is > what I tried to do for this specific pascal-flag) IMO, it's going to be a lot easier if you make all you need available in the type. There's precedent for that in GDB. There are a couple of reasons you don't want a type to symtab link - for instance, handling of types which are duplicated across multiple input files. We don't do that very well today, but we should. -- Thanks, Daniel