From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1605 invoked by alias); 23 Jan 2006 15:05:59 -0000 Received: (qmail 1470 invoked by uid 22791); 23 Jan 2006 15:05:57 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 23 Jan 2006 15:05:53 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F13GR-00046x-2n; Mon, 23 Jan 2006 10:05:51 -0500 Date: Mon, 23 Jan 2006 15:05:00 -0000 From: Daniel Jacobowitz To: Thomas Richter Cc: gdb-patches@sourceware.org Subject: Re: C++ support improvement patch Message-ID: <20060123150551.GA15715@nevyn.them.org> Mail-Followup-To: Thomas Richter , gdb-patches@sourceware.org References: <20060123141344.GA13883@nevyn.them.org> <200601231459.k0NExoA9009812@mersenne.math.TU-Berlin.DE> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200601231459.k0NExoA9009812@mersenne.math.TU-Berlin.DE> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00324.txt.bz2 On Mon, Jan 23, 2006 at 03:59:50PM +0100, Thomas Richter wrote: > Thanks for letting me know that this is being worked on. I agree that > the given patch is pretty much a "hands on" approach. If there's a better > way to do it, please do. Otherwise, the patch is "better than nothing". Maybe, maybe not. The readline completion is fairly finicky. I'm pretty sure colon was included for a reason, although I don't know offhand what it was; but this is exactly the same problem as with var. and it shouldn't be solved differently. > > > o) GDB now avoids to set multiple breakpoints to the same location. > > > This goes in conjunction with another bug, namely that of being unable > > > to find constructors of multiply-inherited classes. Without the current > > > patch, setting a breakpoint for a constructor results in multiple breakpoint > > > locations found, all of them identical, and none of them actually > > > beeing breaked on. With the patch applied, GDB at least finds only one > > > of the locations (good), but still doesn't break there (bad). This bug > > > seems partially caused by g++ not emmiting mangled names for constructors. > > > > Would be better not to return duplicates, instead of not putting > > duplicates on the list... we know exactly why this happens. It's > > all part of the multiple constructors issue that you mentioned below, > > and you can find more information about this in the gdb@ list archives. > > Could you provide a reference, please? Currently, the found symbols are > identically (in fact, it's even the same structure using the same pointer), > so I don't quite see what's the benefit as there's no chance of telling > them apart later. I get two breakpoints at the same location (then, breaking > nothing). In the long run, though, I agree and the problem should be fixed, > not the symptom. For instance, this and followups: http://sourceware.org/ml/gdb/2006-01/msg00102.html Although that doesn't address this particular sub-problem. The actual cause of the two duplicate breakpoints is GDB's bogus dependence on DW_AT_MIPS_linkage_name, which the abstract constructors do not have. Both your breakpoints are probably being placed at the not-in-charge constructor; if you constructed a derived class which virtually inherited from this one, you would probably hit that breakpoint. > Thus, a similar patch applied higher in the calling chain, within > "info"? Probably a new interface. I haven't thought about where it would go. But breaking the current behavior for 'print' just isn't acceptable; too many people expect it. -- Daniel Jacobowitz CodeSourcery