From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26634 invoked by alias); 3 May 2008 15:25:22 -0000 Received: (qmail 26592 invoked by uid 22791); 3 May 2008 15:25:21 -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; Sat, 03 May 2008 15:25:01 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 2741D983D9; Sat, 3 May 2008 15:24:59 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 958BF98150; Sat, 3 May 2008 15:24:58 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JsJbd-0005Xw-OQ; Sat, 03 May 2008 11:24:57 -0400 Date: Sat, 03 May 2008 15:39:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: gdb-patches@sourceware.org, bauerman@br.ibm.com, amodra@bigpond.net.au Subject: Re: Shared library call problems on PowerPC with current binutils/gdb Message-ID: <20080503152457.GA20531@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , gdb-patches@sourceware.org, bauerman@br.ibm.com, amodra@bigpond.net.au References: <20080502215132.GA12244@caradoc.them.org> <200805022229.m42MT4UQ020315@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200805022229.m42MT4UQ020315@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.17 (2007-12-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-05/txt/msg00127.txt.bz2 On Sat, May 03, 2008 at 12:29:04AM +0200, Ulrich Weigand wrote: > Daniel Jacobowitz wrote: > > > This appears to work consistently, where by work I mean disassembly > > shows the @plt sym but breakpoints on the undecorated version work > > fine. I'm not sure exactly why; it may be luck. lookup_minimal_symbol_by_pc_section takes the last match in case of multiple matches. Minimal symbols are sorted by name. So malloc@plt always sorts after malloc. Subtle, but not luck exactly. > > Hmm, thinking about this more, it probably won't work for your > > case after all. lookup_solib_trampoline_symbol_by_pc will return > > NULL if the first symbol we find is the text version. > > If we have two symbols, *both* need to be mst_solib_trampoline. Would that be true if we could search for a symbol with the appropriate type? Prefer the trampoline when trying to find a trampoline target, prefer the text symbol with the decorated name otherwise. Giving them different names could work too, but there are so many different "symbol names" that giving them further distinction makes me nervous (NATURAL, LINKAGE, DEMANGLED, PRINT, SEARCH). -- Daniel Jacobowitz CodeSourcery