This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: a question about rs6k's prologue analysis


[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]