Set si_trapno to the fault index from fsr.
Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25772
This commit is contained in:
parent
c294dddb03
commit
91371fbcf6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=363615
@ -169,7 +169,8 @@ static const struct abort aborts[] = {
|
||||
};
|
||||
|
||||
static __inline void
|
||||
call_trapsignal(struct thread *td, int sig, int code, vm_offset_t addr)
|
||||
call_trapsignal(struct thread *td, int sig, int code, vm_offset_t addr,
|
||||
int trapno)
|
||||
{
|
||||
ksiginfo_t ksi;
|
||||
|
||||
@ -185,6 +186,7 @@ call_trapsignal(struct thread *td, int sig, int code, vm_offset_t addr)
|
||||
ksi.ksi_signo = sig;
|
||||
ksi.ksi_code = code;
|
||||
ksi.ksi_addr = (void *)addr;
|
||||
ksi.ksi_trapno = trapno;
|
||||
trapsignal(td, &ksi);
|
||||
}
|
||||
|
||||
@ -252,7 +254,7 @@ abort_debug(struct trapframe *tf, u_int fsr, u_int prefetch, bool usermode,
|
||||
struct thread *td;
|
||||
|
||||
td = curthread;
|
||||
call_trapsignal(td, SIGTRAP, TRAP_BRKPT, far);
|
||||
call_trapsignal(td, SIGTRAP, TRAP_BRKPT, far, FAULT_DEBUG);
|
||||
userret(td, tf);
|
||||
} else {
|
||||
#ifdef KDB
|
||||
@ -523,7 +525,7 @@ abort_handler(struct trapframe *tf, int prefetch)
|
||||
ksig.addr = far;
|
||||
|
||||
do_trapsignal:
|
||||
call_trapsignal(td, ksig.sig, ksig.code, ksig.addr);
|
||||
call_trapsignal(td, ksig.sig, ksig.code, ksig.addr, idx);
|
||||
out:
|
||||
if (usermode)
|
||||
userret(td, tf);
|
||||
|
Loading…
Reference in New Issue
Block a user