• Qing Zhang's avatar
    LoongArch: ptrace: Add hardware single step support · 424421a7
    Qing Zhang authored
    Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT,
    PTRACE_KILL and PTRACE_SINGLESTEP handling. This implies defining
    arch_has_single_step() and implementing the user_enable_single_step()
    and user_disable_single_step() functions.
    
    LoongArch cannot do hardware single-stepping per se, the hardware
    single-stepping it is achieved by configuring the instruction fetch
    watchpoints (FWPS) and specifies that the next instruction must trigger
    the watch exception by setting the mask bit. In some scenarios
    CSR.FWPS.Skip is used to ignore the next hit result, avoid endless
    repeated triggering of the same watchpoint without canceling it.
    Signed-off-by: default avatarQing Zhang <zhangqing@loongson.cn>
    Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
    424421a7
loongarch.h 54.9 KB