From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17710 invoked by alias); 6 Jun 2003 22:47:02 -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 17679 invoked from network); 6 Jun 2003 22:47:01 -0000 Received: from unknown (HELO zenia.home) (12.223.225.216) by sources.redhat.com with SMTP; 6 Jun 2003 22:47:01 -0000 Received: by zenia.home (Postfix, from userid 5433) id 8A08E20FE6; Fri, 6 Jun 2003 17:47:31 -0500 (EST) To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: [ppc64-linux]: skip linkage functions References: <20030606000328.GA26538@nevyn.them.org> <20030606131122.GA20576@nevyn.them.org> <20030606201718.GA30328@nevyn.them.org> <20030606214003.GA11393@nevyn.them.org> From: Jim Blandy Date: Fri, 06 Jun 2003 22:47:00 -0000 In-Reply-To: <20030606214003.GA11393@nevyn.them.org> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-06/txt/msg00246.txt.bz2 Daniel Jacobowitz writes: > On Fri, Jun 06, 2003 at 03:31:58PM -0500, Jim Blandy wrote: > > Daniel Jacobowitz writes: > > > What blows up if we don't recognize the trampolines though? > > > > On the PPC64, 'next' blows up. > > Oh, I hit this problem on another platform recently. And I had to do a > similar hack for trampolines. > > It seems that there shold be a simpler solution than trying to parse > the trampoline... Well, the only relevant piece of machine state is the PC. From there you can either look at the code (trampoline parsing), or look at meta-information associated with the address (DW_AT_trampoline). That exhausts the possibilities, doesn't it? A simpler meta-information approach might be to insert some new sort of symbol (STT_GNU_TRAMPOLINE?) whose value was the start address of the trampoline, and whose name was the name of the function the trampoline called. Then in_solib_call_trampoline would just check for an STT_GNU_TRAMPOLINE symbol, and skip_trampoline_code would return the value of the STT_FUNC symbol of the same name.