From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21556 invoked by alias); 16 Jul 2004 21:54:52 -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 21548 invoked from network); 16 Jul 2004 21:54:52 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 16 Jul 2004 21:54:52 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i6GLspe3011472 for ; Fri, 16 Jul 2004 17:54:51 -0400 Received: from zenia.home.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i6GLsna07117; Fri, 16 Jul 2004 17:54:50 -0400 To: mec.gnu@mindspring.com (Michael Elizabeth Chastain) Cc: drow@false.org, eliz@gnu.org, gdb@sources.redhat.com, rolandz@poczta.fm Subject: Re: How to setup a breakpoint on constructor References: <20040716193117.EFE514B104@berman.michael-chastain.com> From: Jim Blandy Date: Fri, 16 Jul 2004 22:15:00 -0000 In-Reply-To: <20040716193117.EFE514B104@berman.michael-chastain.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-07/txt/msg00220.txt.bz2 mec.gnu@mindspring.com (Michael Elizabeth Chastain) writes: > To take the points in reverse order, > > > (B) It exposes the difference between complete and base constructors, > > which is an implementation detail of the C++ ABI that most users don't > > understand. > > That is reality. The reality is that g++ emits two functions in the > object code. In my opinion, if we try to gloss over that, then we'll > just create more confusion for commands such as 'disassemble' and > 'tbreak'. > > > (A) It was an ugly interface change to work around an internal > > limitation, and they needed to retrain users to it. > > I agree with this part, to an extent. However, the gdb group > has no control over the fact that there are two object code > functions. > > I like the way it worked in gcc 2.95.3. With gcc 2.95.3, > gcc emits one function with a hidden parameter. c++ programmers > and gdb are both familiar with hidden parameters ('this'). > If I recall correctly, Apple modified gcc 3.X to do something > similar. If I remember right, the use of separate complete and base constructors is an ABI requirement; the compiler doesn't have the option of just generating whatever code it likes.