From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17035 invoked by alias); 17 Jul 2004 20:54:15 -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 16887 invoked from network); 17 Jul 2004 20:54:14 -0000 Received: from unknown (HELO smtp10.atl.mindspring.net) (207.69.200.246) by sourceware.org with SMTP; 17 Jul 2004 20:54:14 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by smtp10.atl.mindspring.net with esmtp (Exim 3.33 #1) id 1BlwA8-0001OQ-00; Sat, 17 Jul 2004 16:52:04 -0400 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 56BC04B104; Sat, 17 Jul 2004 16:52:25 -0400 (EDT) To: drow@false.org, eliz@gnu.org Subject: Re: How to setup a breakpoint on constructor Cc: gdb@sources.redhat.com, mec.gnu@mindspring.com, rolandz@poczta.fm Message-Id: <20040717205225.56BC04B104@berman.michael-chastain.com> Date: Sat, 17 Jul 2004 23:17:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2004-07/txt/msg00228.txt.bz2 > Coincidentally that's what the entire discussion of 1:N breakpoints > last year was about but no one has had time to implement it. Right. 1:N breakpoints are better than A::A$base(), but it's been 3 years since the ctor-breakpoint issue came up, and we don't have anything at all yet. > The reason this is hard is that breakpoints by line number inside the > constructor will still get randomly set on one copy. Many IDEs will set > breakpoints in this fashion. With A::A$base(), the breakpoints will always get set in the complete object constructor, because that is the only function named A::A(). People will still get only one breakpoint, but it's deterministic, not random. But if someone breaks in A::A$base() and then says 'break 1000' to get into the middle of the function (which I do a lot), then they would get the breakpoint in the wrong copy! So even if we disambiguate the names, the 1:N nature of multiple ctors shines through. I wish we could persuade gcc to generate a unified ctor. Michael C