From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9492 invoked by alias); 15 Feb 2010 18:49:43 -0000 Received: (qmail 9484 invoked by uid 22791); 15 Feb 2010 18:49:43 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Feb 2010 18:49:37 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1FInaP8029537 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 15 Feb 2010 13:49:36 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1FInXer001612 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 15 Feb 2010 13:49:35 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id o1FInXSA018491 for ; Mon, 15 Feb 2010 19:49:33 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id o1FInWNj018471 for gdb-patches@sourceware.org; Mon, 15 Feb 2010 19:49:32 +0100 Date: Mon, 15 Feb 2010 18:49:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: Re: [patch] STT_GNU_IFUNC support Message-ID: <20100215184932.GA18278@host0.dyn.jankratochvil.net> References: <20100214203512.GA838@host0.dyn.jankratochvil.net> <20100215184048.GA16276@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100215184048.GA16276@caradoc.them.org> User-Agent: Mutt/1.5.20 (2009-08-17) 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: 2010-02/txt/msg00373.txt.bz2 On Mon, 15 Feb 2010 19:40:50 +0100, Daniel Jacobowitz wrote: > On Sun, Feb 14, 2010 at 09:35:12PM +0100, Jan Kratochvil wrote: > > This implementation resolves ifunc in an uncached way by an inferior call any > > time the symbol resolution is needed. It does not try to pick out the jump > > address value from ".got.plt" as filled there by ld.so. (GDB stepping into > > library functions also does not try to do so.) > > Do you mean that "print strcmp" or "break strcmp" is now going to do > an inferior call? Yes. > Inferior calls are very slow, and they can go wrong (pending signals, > misbehaving programs, etc). I believe we should make an effort to > minimize them. Caching may not help as during first "print strcmp" it may be called neither by the inferior nor by gdb yet. Making the "print strcmp" output dependent on whether "strcmp" has been already called looks too non-deterministic to me. Displaying the indirect function resolver on "print strcmp" looks to me as needlessly complex for normal application developers. > For user messages, maybe we should call these "indirect functions"; > that's what ifunc is short for. OK. Thanks, Jan