Changeset View
Changeset View
Standalone View
Standalone View
sys/riscv/riscv/db_trace.c
| Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | while (1) { | ||||
| db_printsym(frame->pc, DB_STGY_PROC); | db_printsym(frame->pc, DB_STGY_PROC); | ||||
| db_printf("\n"); | db_printf("\n"); | ||||
| if (strcmp(name, "cpu_exception_handler_supervisor") == 0 || | if (strcmp(name, "cpu_exception_handler_supervisor") == 0 || | ||||
| strcmp(name, "cpu_exception_handler_user") == 0) { | strcmp(name, "cpu_exception_handler_user") == 0) { | ||||
| struct trapframe *tf; | struct trapframe *tf; | ||||
| tf = (struct trapframe *)(uintptr_t)frame->sp; | tf = (struct trapframe *)(uintptr_t)frame->sp; | ||||
| if (!__is_aligned(tf, _Alignof(*tf)) || | if (!__is_aligned(tf, _Alignof(struct trapframe)) || | ||||
| !kstack_contains(td, (vm_offset_t)tf, | !kstack_contains(td, (vm_offset_t)tf, | ||||
| sizeof(*tf))) { | sizeof(*tf))) { | ||||
| db_printf("--- invalid trapframe %p\n", tf); | db_printf("--- invalid trapframe %p\n", tf); | ||||
| break; | break; | ||||
| } | } | ||||
| if ((tf->tf_scause & SCAUSE_INTR) != 0) { | if ((tf->tf_scause & SCAUSE_INTR) != 0) { | ||||
| db_printf("--- interrupt %ld\n", | db_printf("--- interrupt %ld\n", | ||||
| ▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines | |||||