• Corey Minyard's avatar
    [PATCH] PPC debug setcontext syscall implementation. · a784ab71
    Corey Minyard authored
    Add a debugging interface for PowerPC that allows signal handlers (or any
    jump to a context, really) to perform debug functions.  It allows the a
    user program to turn on single-stepping, for instance, and the thread will
    get a trap after executing the next instruction.  It can also (on supported
    PPC processors) turn on branch tracing and get a trap after the next branch
    instruction is executed.  This is useful for in-application debugging.
    
    Note that you can enable single-stepping on x86 processors directly from
    signal handlers.  Newer x86 processors have the equivalent of a
    branch-trace bit in the IA32_DEBUGCTL MSR and could have similar function
    to this syscall.  Most other processors could benefit from a similar
    interface, except for ARM which is extraordinarily broken for debugging.
    
    Future uses of this could be adding the ability to set the hardware
    breakpoint registers from a signal handler.
    Signed-off-by: default avatarCorey Minyard <minyard@mvista.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    a784ab71
unistd.h 13.8 KB