• K.Prasad's avatar
    powerpc, hw_breakpoint: Enable hw-breakpoints while handling intervening signals · 06532a67
    K.Prasad authored
    A signal delivered between a hw_breakpoint_handler() and the
    single_step_dabr_instruction() will not have the breakpoint active
    while the signal handler is running -- the signal delivery will
    set up a new MSR value which will not have MSR_SE set, so we
    won't get the signal step interrupt until and unless the signal
    handler returns (which it may never do).
    
    To fix this, we restore the breakpoint when delivering a signal --
    we clear the MSR_SE bit and set the DABR again.  If the signal
    handler returns, the DABR interrupt will occur again when the
    instruction that we were originally trying to single-step gets
    re-executed.
    
    [Paul Mackerras <paulus@samba.org> pointed out the need to do this.]
    Signed-off-by: default avatarK.Prasad <prasad@linux.vnet.ibm.com>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    06532a67
hw_breakpoint.h 2.49 KB