From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9510 invoked by alias); 11 Oct 2006 13:53:55 -0000 Received: (qmail 9499 invoked by uid 22791); 11 Oct 2006 13:53:55 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 11 Oct 2006 13:53:48 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GXeWd-0006mF-MX; Wed, 11 Oct 2006 09:53:35 -0400 Date: Wed, 11 Oct 2006 13:53:00 -0000 From: Daniel Jacobowitz To: Ramana Radhakrishnan , Joel Brobecker Cc: Wu Zhou , gdb@sourceware.org Subject: Re: a question about rs6k's prologue analysis Message-ID: <20061011135335.GB25745@nevyn.them.org> Mail-Followup-To: Ramana Radhakrishnan , Joel Brobecker , Wu Zhou , gdb@sourceware.org References: <452CC397.5050304@cn.ibm.com> <1160563558.5061.15.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1160563558.5061.15.camel@localhost.localdomain> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00063.txt.bz2 [Please don't top-post :-)] On Wed, Oct 11, 2006 at 04:15:58PM +0530, Ramana Radhakrishnan wrote: > I am guessing a bit but you could use it for "milli" calls to functions > to save callee save registers ? Was this done on the PowerPC at any > time ? > > If it is in the first 3 instructions then maybe its a milli-call and you > might have other instructions in the prologue after that. There are such functions on some PowerPC ABIs, but I don't think GDB supports them particularly well. This particular one is for something different: it's loading the GOT pointer. > On Wed, 2006-10-11 at 18:12 +0800, Wu Zhou wrote: > > In function skip_prologue of rs6000-tdep.c, when it finds an instruction like "bl foo", and that it > > is not within the first three instructions of the prologue, the prologue analysis will stop. > > > > else if ((op & 0xfc000001) == 0x48000001) > > { /* bl foo, > > to save fprs??? */ > > > > fdata->frameless = 0; > > /* Don't skip over the subroutine call if it is not within > > the first three instructions of the prologue. */ > > if ((pc - fdata->func_start) > 8) > > break; > > .... > > } > > > > Any specific reason for this? I knew this sounded familiar. Here it is: http://sourceware.org/ml/gdb-patches/2004-12/msg00234.html http://sourceware.org/ml/gdb-patches/2005-06/msg00242.html Joel, things have changed a lot since then - if you have a chance to respond to my last message there, I'll take another look at it. -- Daniel Jacobowitz CodeSourcery