1.前言
ARMv8 异常处理之el1_sync-CSDN博客
2.el1_dbg
static void noinstr el1_dbg(struct pt_regs *regs, unsigned long esr)
{
unsigned long far = read_sysreg(far_el1);//保存了导致异常发生的虚拟地址
arm64_enter_el1_dbg(regs);
do_debug_exception(far, esr, regs);//跳转do_debug_exception
arm64_exit_el1_dbg(regs);
}
2.1 do_debug_exception
void do_debug_exception(unsigned long addr_if_watchpoint, unsigned int esr,
struct pt_regs *regs)
{
const struct fault_info *inf = esr_to_debug_fault_info(esr);//根据esr获取对应的fault_info的指针
unsigned long pc = instructi