From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1131 invoked by alias); 3 May 2008 15:39:29 -0000 Received: (qmail 1123 invoked by uid 22791); 3 May 2008 15:39:29 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate6.de.ibm.com (HELO mtagate6.de.ibm.com) (195.212.29.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 03 May 2008 15:39:07 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate6.de.ibm.com (8.13.8/8.13.8) with ESMTP id m43FcfsO262312 for ; Sat, 3 May 2008 15:38:41 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m43FceBg3784826 for ; Sat, 3 May 2008 17:38:40 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m43FceLA013615 for ; Sat, 3 May 2008 17:38:40 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id m43Fce6B013612; Sat, 3 May 2008 17:38:40 +0200 Message-Id: <200805031538.m43Fce6B013612@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Sat, 3 May 2008 17:38:40 +0200 Subject: Re: Shared library call problems on PowerPC with current binutils/gdb To: drow@false.org (Daniel Jacobowitz) Date: Sat, 03 May 2008 15:59:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org, bauerman@br.ibm.com, amodra@bigpond.net.au In-Reply-To: <20080503152457.GA20531@caradoc.them.org> from "Daniel Jacobowitz" at May 03, 2008 11:24:57 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/msg00129.txt.bz2 Daniel Jacobowitz wrote: > 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. I see. Hmmm, we could do the same for versioned symbols and just install two minsyms. For disassembly, we'd see the decorated name, but searching for just the base name would find the function as well ... > > > 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. That's probably the best solution, right. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com