From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14906 invoked by alias); 12 Jul 2005 00:56:44 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 14884 invoked by uid 22791); 12 Jul 2005 00:56:38 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 12 Jul 2005 00:56:38 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1Ds94e-0005dd-Cq; Mon, 11 Jul 2005 20:56:36 -0400 Date: Tue, 12 Jul 2005 00:56:00 -0000 From: Daniel Jacobowitz To: Devang Patel Cc: GCC Development Subject: Re: Reducing debug info for C++ ctors/dtors Message-ID: <20050712005636.GA21559@nevyn.them.org> Mail-Followup-To: Devang Patel , GCC Development References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-07/txt/msg00474.txt.bz2 On Mon, Jul 11, 2005 at 05:37:32PM -0700, Devang Patel wrote: > will emit a class definition LSYM of > > .stabs "Base1:Tt(0,41)=s4x:(0,9),0,32;__base_ctor ::(0,42)=# > (0,41),(0,36),(0,43)=*(0,41),(0,9),(0,36);:_ZN5Base1C2Ei; > 2A.;__comp_ctor ::(0,42):_ZN5Base1C1Ei;2A.;getx::(0,44)=#(0,41),(0,9), > (0,43),(0,36);:_ZN5Base14getxEv;2A.;;",128,0,1,0 > > > However, it is good enough to have > > .stabs "Base1:Tt(0,41)=s4x:(0,9),0,32;getx::(0,44)=#(0,41), > (0,9),(0,43)=*(0,41),(0,36);:_ZN5Base14getxEv;2A.;;",128,0,1,0 > > and keep the stabs for the cdtors in other contexts, most obviously > the FUN stab where the function is defined. e.g. Eh, no. You have just lost any information about what constructors were declared in the class. Reconstructing this from what constructors we can find a definition of will be messy and error-prone, because the debugger will not be able to link a member function back to a particular member in the definition of the class type. Dwarf handles clones very differently from stabs. The abstract definition goes in the class type and the clones only have concrete instances. That is probably what you want for stabs: have one of the base/complete ctors, but not both. The effect on dwarf output might be more interesting. GDB just ignores all but one of each set in stabs anyway. -- Daniel Jacobowitz CodeSourcery, LLC