Index: head/sys/riscv/include/db_machdep.h =================================================================== --- head/sys/riscv/include/db_machdep.h +++ head/sys/riscv/include/db_machdep.h @@ -47,7 +47,7 @@ typedef vm_offset_t db_addr_t; typedef long db_expr_t; -#define PC_REGS() ((db_addr_t)kdb_thrctx->pcb_sepc) +#define PC_REGS() ((db_addr_t)kdb_frame->tf_sepc) #define BKPT_INST (0x00100073) #define BKPT_SIZE (INSN_SIZE) Index: head/sys/riscv/include/pcb.h =================================================================== --- head/sys/riscv/include/pcb.h +++ head/sys/riscv/include/pcb.h @@ -46,15 +46,12 @@ uint64_t pcb_sp; /* Stack pointer */ uint64_t pcb_gp; /* Global pointer */ uint64_t pcb_tp; /* Thread pointer */ - uint64_t pcb_t[7]; /* Temporary registers */ uint64_t pcb_s[12]; /* Saved registers */ - uint64_t pcb_a[8]; /* Argument registers */ uint64_t pcb_x[32][2]; /* Floating point registers */ uint64_t pcb_fcsr; /* Floating point control reg */ uint64_t pcb_fpflags; /* Floating point flags */ #define PCB_FP_STARTED 0x1 #define PCB_FP_USERMASK 0x1 - uint64_t pcb_sepc; /* Supervisor exception pc */ vm_offset_t pcb_onfault; /* Copyinout fault handler */ }; Index: head/sys/riscv/riscv/genassym.c =================================================================== --- head/sys/riscv/riscv/genassym.c +++ head/sys/riscv/riscv/genassym.c @@ -69,9 +69,7 @@ ASSYM(PCB_SP, offsetof(struct pcb, pcb_sp)); ASSYM(PCB_GP, offsetof(struct pcb, pcb_gp)); ASSYM(PCB_TP, offsetof(struct pcb, pcb_tp)); -ASSYM(PCB_T, offsetof(struct pcb, pcb_t)); ASSYM(PCB_S, offsetof(struct pcb, pcb_s)); -ASSYM(PCB_A, offsetof(struct pcb, pcb_a)); ASSYM(PCB_X, offsetof(struct pcb, pcb_x)); ASSYM(PCB_FCSR, offsetof(struct pcb, pcb_fcsr)); Index: head/sys/riscv/riscv/machdep.c =================================================================== --- head/sys/riscv/riscv/machdep.c +++ head/sys/riscv/riscv/machdep.c @@ -558,15 +558,12 @@ makectx(struct trapframe *tf, struct pcb *pcb) { - memcpy(pcb->pcb_t, tf->tf_t, sizeof(tf->tf_t)); memcpy(pcb->pcb_s, tf->tf_s, sizeof(tf->tf_s)); - memcpy(pcb->pcb_a, tf->tf_a, sizeof(tf->tf_a)); pcb->pcb_ra = tf->tf_ra; pcb->pcb_sp = tf->tf_sp; pcb->pcb_gp = tf->tf_gp; pcb->pcb_tp = tf->tf_tp; - pcb->pcb_sepc = tf->tf_sepc; } void