This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: a question about rs6k's prologue analysis
- From: Daniel Jacobowitz <drow at false dot org>
- To: Ramana Radhakrishnan <ramana dot radhakrishnan at codito dot com>, Joel Brobecker <brobecker at adacore dot com>
- Cc: Wu Zhou <woodzltc at cn dot ibm dot com>, gdb at sourceware dot org
- Date: Wed, 11 Oct 2006 09:53:35 -0400
- Subject: Re: a question about rs6k's prologue analysis
- References: <452CC397.5050304@cn.ibm.com> <1160563558.5061.15.camel@localhost.localdomain>
[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