From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10978 invoked by alias); 2 Oct 2005 22:31:22 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 10971 invoked by uid 22791); 2 Oct 2005 22:31:20 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sun, 02 Oct 2005 22:31:20 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1EMCMY-0000mx-K7; Sun, 02 Oct 2005 18:31:18 -0400 Date: Sun, 02 Oct 2005 22:31:00 -0000 From: Daniel Jacobowitz To: Alan Modra Cc: gdb-patches@sources.redhat.com Subject: Re: Fix powerpc64-linux inferior function calls Message-ID: <20051002223118.GC32728@nevyn.them.org> Mail-Followup-To: Alan Modra , gdb-patches@sources.redhat.com References: <20050928073345.GK29044@bubble.grove.modra.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050928073345.GK29044@bubble.grove.modra.org> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-10/txt/msg00005.txt.bz2 On Wed, Sep 28, 2005 at 05:03:45PM +0930, Alan Modra wrote: > This gives me a gdb that can make inferior calls on powerpc64-linux when > debugging code compiled by a gcc that doesn't provide dot-symbols. > ppc-sysv-tdep.c:convert_code_addr_to_desc_addr needs dot-symbols to find > the function descriptor corresponding to a given pc. > > It's a band-aid really. I think the proper fix is to not convert > function pointers to function code addresses in gdb's expression > evaluator, which would keep the pointer to the descriptor. This of > course would mean that gdb's breakpoint and similar code expecting that > function symbols point to code would need adjusting. One benefit would > be that "p *func" would print me the descriptor, which is what I'd > expect for powerpc64. > > PR 2016 > * elfread.c (elf_symtab_process): Split out from.. > (elf_symtab_read): ..here. > (elf_symfile_read): Read both static and dynamic symbols before > processing. Call bfd_get_synthetic_symtab. Why do we need to read both before processing either? I'm thinking of the patch I posted here: http://sourceware.org/ml/gdb-patches/2005-06/msg00220.html and pinged a few weeks ago. -- Daniel Jacobowitz CodeSourcery, LLC