Handle the breakpoint instruction in userland by sending a SIGTRAP signal.
This commit is contained in:
parent
790cec3cb6
commit
cbbb7c2fa0
@ -327,6 +327,7 @@ el0_excp_unknown(struct trapframe *frame)
|
||||
void
|
||||
do_el0_sync(struct trapframe *frame)
|
||||
{
|
||||
struct thread *td;
|
||||
uint32_t exception;
|
||||
uint64_t esr;
|
||||
|
||||
@ -368,6 +369,11 @@ do_el0_sync(struct trapframe *frame)
|
||||
case EXCP_UNKNOWN:
|
||||
el0_excp_unknown(frame);
|
||||
break;
|
||||
case EXCP_BRK:
|
||||
td = curthread;
|
||||
call_trapsignal(td, SIGTRAP, TRAP_BRKPT, (void *)frame->tf_elr);
|
||||
userret(td, frame);
|
||||
break;
|
||||
default:
|
||||
print_registers(frame);
|
||||
panic("Unknown userland exception %x esr_el1 %lx\n", exception,
|
||||
|
Loading…
x
Reference in New Issue
Block a user