[PATCH] Implement GET_IP/SET_IP for powerpc architecture.

Benjamin Herrenschmidt benh at au1.ibm.com
Fri Feb 3 08:23:53 EST 2012


On Thu, 2012-02-02 at 11:28 -0500, Mike Frysinger wrote:
> On Thursday 02 February 2012 09:41:25 Srikar Dronamraju wrote:
> > +#define GET_FP(regs)		(0)
> > +#define SET_FP(regs, val)
> 
> ppc doesn't have a standard FP location ?

Not really no, it's the sp (r1). r31 might be considered a "frame
pointer" under some circumstances but there isn't much you can do with
it, it's really r1 that gives you the ability to backtrace (each stack
frame contains a pointer to the next one).

> > +#define profile_pc(regs) GET_IP(regs)
> 
> pretty sure you don't need this as asm-generic/ptrace.h already has a 
> definition for you
> -mike

Cheers,
Ben.




More information about the Linuxppc-dev mailing list