From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8655 invoked by alias); 3 Jul 2008 16:01:38 -0000 Received: (qmail 8632 invoked by uid 22791); 3 Jul 2008 16:01:36 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 03 Jul 2008 16:01:05 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 813C298413; Thu, 3 Jul 2008 16:01:03 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 6A0FE982C3; Thu, 3 Jul 2008 16:01:03 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KERF0-0006XA-Qd; Thu, 03 Jul 2008 12:01:02 -0400 Date: Thu, 03 Jul 2008 16:01:00 -0000 From: Daniel Jacobowitz To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [FYI] Inlining support, rough patch [break-by-function-name] Message-ID: <20080703160102.GA24817@caradoc.them.org> Mail-Followup-To: Jan Kratochvil , gdb-patches@sourceware.org References: <20080613152754.GA4220@caradoc.them.org> <20080623115422.GA17511@host0.dyn.jankratochvil.net> <20080702191438.GA3735@caradoc.them.org> <20080703112148.GA30899@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080703112148.GA30899@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-07/txt/msg00037.txt.bz2 On Thu, Jul 03, 2008 at 01:21:48PM +0200, Jan Kratochvil wrote: > On Wed, 02 Jul 2008 21:14:38 +0200, Daniel Jacobowitz wrote: > ... > > Let's wait on that until the rest of the patch is ready, though. > > I'm making good progress. > > That would be great, while discussing the uncommitted patches here is one on > top of it to make `break inlined_function' work with the multi-PC breakpoints. > As you have to be aware of such solution it may have some drawbacks. > > (It does not solve the multiple minimal symbols with the same name as was in: > http://sourceware.org/ml/gdb-patches/2008-05/msg00190.html > ) I can't see how this works, unless you're getting lucky. For instance here: > @@ -5692,7 +5692,7 @@ resolve_sal_pc (struct symtab_and_line * > bv = blockvector_for_pc_sect (sal->pc, 0, &b, sal->symtab); > if (bv != NULL) > { > - sym = block_linkage_function (b); > + sym = block_function (b); > if (sym != NULL) > { > fixup_symbol_section (sym, sal->symtab->objfile); fixup_symbol_section is a symbol lookup. There has to be a real function in the ELF symbol table with the same name, and here that may be in a different section entirely. I think Apple kept a list of inlined instances attached to the main symbol entry for the function. That's probably the way to go, but it requires support for functions in the symbol table that don't have any associated block (in case no copy is emitted out of line). I tried that once and got tangled up; crashes everywhere. -- Daniel Jacobowitz CodeSourcery