From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8654 invoked by alias); 6 Jan 2006 14:25:01 -0000 Received: (qmail 8647 invoked by uid 22791); 6 Jan 2006 14:25:00 -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; Fri, 06 Jan 2006 14:24:59 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EusWX-0001Zl-0s; Fri, 06 Jan 2006 09:24:57 -0500 Date: Fri, 06 Jan 2006 14:25:00 -0000 From: Daniel Jacobowitz To: Amit Kale Cc: GDB patches Subject: Re: Breakpoints in constructors Message-ID: <20060106142456.GA6042@nevyn.them.org> Mail-Followup-To: Amit Kale , GDB patches References: <200601031835.45731.amitkale@linsyssoft.com> <200601061856.39161.amitkale@linsyssoft.com> <20060106134503.GB4796@nevyn.them.org> <200601061948.57309.amitkale@linsyssoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200601061948.57309.amitkale@linsyssoft.com> 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/msg00079.txt.bz2 On Fri, Jan 06, 2006 at 07:48:57PM +0530, Amit Kale wrote: > On Friday 06 Jan 2006 7:15 pm, Daniel Jacobowitz wrote: > > On Fri, Jan 06, 2006 at 06:56:39PM +0530, Amit Kale wrote: > > > I was not able to fix other failures though. The major one being a > > > breakpoint on a statement in main causes three breakpoints to appear. > > > It's because this statement is a call to a C++ inlined function. The > > > expansion of inline function dodges the check in my patch for multiple > > > breakpoints appearing for the same C statement when the statement is > > > spread across multiple instructions interlaced with instructions from > > > surrounding statements. I checked for function name, which would be the > > > inline function name. That's why my check fails. Sigh, I wanted to send > > > this patch again only after fixing this problem, but don't have any good > > > ideas on how to do that. I'll very much appreciate if anyone has ideas > > > about fixing this. > > > > The hack of checking whether they appear in the same function just > > won't scale to fix this - possibly ever, but certainly not until inline > > functions are represented properly in GDB's symbol table. > > Bad news. > > Any ideas about how to check whether multiple functions appear in the same > function block? There is no way to distinguish between multiple inlined copies of a line and multiple fragments of a line generated by optimization, given GCC's current .debug_line section, without also having .debug_info and building inline functions into the symbol table. The information just isn't there. -- Daniel Jacobowitz CodeSourcery