X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-sh%2Fptrace.h;h=0f75e16a74150ec04eabc711c702fc2d12436fc6;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=d0ca02c926bf0b45a173f898f4981f0148ab00df;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/include/asm-sh/ptrace.h b/include/asm-sh/ptrace.h index d0ca02c92..0f75e16a7 100644 --- a/include/asm-sh/ptrace.h +++ b/include/asm-sh/ptrace.h @@ -90,6 +90,15 @@ struct pt_dspregs { #define user_mode(regs) (((regs)->sr & 0x40000000)==0) #define instruction_pointer(regs) ((regs)->pc) extern void show_regs(struct pt_regs *); + +static inline unsigned long profile_pc(struct pt_regs *regs) +{ + unsigned long pc = instruction_pointer(regs); + + if (pc >= 0xa0000000UL && pc < 0xc0000000UL) + pc -= 0x20000000; + return pc; +} #endif #endif /* __ASM_SH_PTRACE_H */