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