mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 22:32:43 -04:00
arm64: Use a switch to decide when to enable debug
Use a switch statement to decide which exceptions we need to call dbg_enable for. This simplifies adding more esceptions to the list in the future. Reviewed by: jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44352
This commit is contained in:
parent
2e2c983d52
commit
d93b3a65f7
1 changed files with 8 additions and 2 deletions
|
|
@ -498,9 +498,15 @@ do_el1h_sync(struct thread *td, struct trapframe *frame)
|
|||
* Enable debug exceptions if we aren't already handling one. They will
|
||||
* be masked again in the exception handler's epilogue.
|
||||
*/
|
||||
if (exception != EXCP_BRK && exception != EXCP_WATCHPT_EL1 &&
|
||||
exception != EXCP_SOFTSTP_EL1)
|
||||
switch (exception) {
|
||||
case EXCP_BRK:
|
||||
case EXCP_WATCHPT_EL1:
|
||||
case EXCP_SOFTSTP_EL1:
|
||||
break;
|
||||
default:
|
||||
dbg_enable();
|
||||
break;
|
||||
}
|
||||
|
||||
switch (exception) {
|
||||
case EXCP_FP_SIMD:
|
||||
|
|
|
|||
Loading…
Reference in a new issue