questions around Book III-E and branch trace

Chris Friesen chris.friesen at genband.com
Thu Apr 18 04:44:29 EST 2013


Hi,

I'm trying to wrap my head around how linux handles branch tracing on 
Book III-E.  I think I understand how we set MSR[DE] and DBCR0[IDM|BT], 
and how we handle fixing things up if an instruction being traced causes 
an exception.

I have a few questions though:

1) Does user_enable_block_step() have a bug in it?  The current code has

task->thread.dbcr0 = DBCR0_IDM | DBCR0_BT;

Should that be as follows (to match the singel-step case)?

task->thread.dbcr0 |= DBCR0_IDM | DBCR0_BT;


2) Why doesn't DBCR0_ACTIVE_EVENTS include DBCR0_BT?


3) In sys_debug_setcontext() why does SIG_DBG_BRANCH_TRACING return 
-EINVAL if CONFIG_PPC_ADV_DEBUG_REGS is set?  Would it not be possible 
to use DBCR0_BT?

Thanks,
Chris


-- 

Chris Friesen
Software Designer

500 Palladium Drive, Suite 2100
Ottawa, Ontario K2N 1C2, Canada
www.genband.com
office:+1.343.883.2717
chris.friesen at genband.com



More information about the Linuxppc-dev mailing list