[RFC][PATCH 1/2] powerpc/booke: extend PTRACE_SINGLEBLOCK for BookE Branch Taken Debug

Scott Wood scottwood at freescale.com
Wed Jul 10 02:53:45 EST 2013


On 07/05/2013 05:11:04 PM, James Yang wrote:
> This patch makes available the unmodified BookE branch taken debug
> exception through PTRACE_SINGLEBLOCK if the ptrace() addr parameter is
> set to 2.

This is hacky -- if we must retain the existing PTRACE_SINGLEBLOCK  
semantics (which aren't actually documented anywhere AFAICT -- if the  
details are meant to be implementation-defined, then don't we have some  
freedom here to actually do what the hardware does, especially if we  
can't find existing users?), then perhaps a new PTRACE_WHATEVER should  
be defined.

At the very least, magic numbers should be given symbolic names.

-Scott


More information about the Linuxppc-dev mailing list