From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17143 invoked by alias); 11 Feb 2005 16:49:41 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 17109 invoked from network); 11 Feb 2005 16:49:36 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 11 Feb 2005 16:49:36 -0000 Received: from drow by nevyn.them.org with local (Exim 4.44 #1 (Debian)) id 1Czdz6-0006lN-8O; Fri, 11 Feb 2005 11:49:36 -0500 Date: Fri, 11 Feb 2005 16:50:00 -0000 From: Daniel Jacobowitz To: "Rodney M. Bates" Cc: gdb@sources.redhat.com Subject: Re: Design advice, type pointers between object files Message-ID: <20050211164936.GA25768@nevyn.them.org> Mail-Followup-To: "Rodney M. Bates" , gdb@sources.redhat.com References: <420CDC37.6070705@wichita.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <420CDC37.6070705@wichita.edu> User-Agent: Mutt/1.5.6+20040907i X-SW-Source: 2005-02/txt/msg00080.txt.bz2 On Fri, Feb 11, 2005 at 10:24:23AM -0600, Rodney M. Bates wrote: > Do any other languages do this, or do they all create copies of > type and main_type nodes in every objfile-obstack that has symbols > referring to them? Apparently, somebody believed the STAB type info > produced by the Modula-3 compiler was not good enough, although > it does exist, and I haven't seen any obvious problems with it. There should always be a definition of the type, if there is a variable which references it. This problem has come up with stabs cross-references before; caching between objfiles is a bad idea. There's some code to copy types in gdbtypes.c IIRC. > Other possibilities that occur to me: > 1. Don't discard dynamic library object files when doing a rerun. > 2. Do discard and reload the main object file when doing a rerun. No. These are really bad ideas and they don't scale to the general case - any of these files could change between runs. > 3. When looking up a type in this way, make copies of the type and > main_type nodes in the objfile_obstack of the referring symbol. Would work, I guess. The best thing would be to try disabling this and using the type info from your compiler. If it works, it'll be more efficient. -- Daniel Jacobowitz CodeSourcery, LLC