f



using iabr on powerpc (e300)

im trying to use the inst breakpoint register (iabr) but there doesn
seem to be any activity when that address is reached

the code im using is

    asm ("msync; isync");
    asm volatile ("mtspr 1010,%0;" :  : "r"(val));
    asm ("isync");
    asm ("isync");

Is this right?
is there someother way to achieve this?
0
sid_itsme
4/13/2012 4:41:10 AM
comp.sys.powerpc.tech 819 articles. 1 followers. Post Follow

2 Replies
398 Views

Similar Articles

[PageSpeed] 17

On Thu, 12 Apr 2012 21:41:10 -0700, sid_itsme wrote:

> im trying to use the inst breakpoint register (iabr) but there doesn
> seem to be any activity when that address is reached
> 
> the code im using is
> 
>     asm ("msync; isync");
>     asm volatile ("mtspr 1010,%0;" :  : "r"(val)); asm ("isync");
>     asm ("isync");
> 
> Is this right?
> is there someother way to achieve this?

I've no experience with this, but did you set the breakpoint enable bit?
i.e.

#define IABR_BE 0x2

val = inst_address | IABR_BE;
asm volatile ("mtspr 1010,%0;" :  : "r"(val));
asm volatile ("isync");
<etc>

and are you sure that the proper address is used?

Rob
0
Rob
4/13/2012 10:33:06 PM
On Friday, 13 April 2012 10:11:10 UTC+5:30, sid_itsme  wrote:
> im trying to use the inst breakpoint register (iabr) but there doesn
> 
> seem to be any activity when that address is reached
> 
> 
> 
> the code im using is
> 
> 
> 
>     asm ("msync; isync");
> 
>     asm volatile ("mtspr 1010,%0;" :  : "r"(val));
> 
>     asm ("isync");
> 
>     asm ("isync");
> 
> 
> 
> Is this right?
> 
> is there someother way to achieve this?

I'm not sure whether you're asking about the other way of approch to achieve the instruction breakpoint, if that is the case then you can place one trap instruction before the address where you need to break and get the control of the code.
0
Sakthi
12/21/2012 11:50:53 AM
Reply: