| 36 | #include <machine/vmparam.h> |
| 37 | |
| 38 | bool |
| 39 | unwind_frame(struct thread *td, struct unwind_state *frame) |
| 40 | { |
| 41 | uintptr_t fp; |
| 42 | |
| 43 | fp = frame->fp; |
| 44 | |
| 45 | if (!kstack_contains(td, fp, sizeof(uintptr_t) * 2)) |
| 46 | return (false); |
| 47 | |
| 48 | frame->sp = fp + sizeof(uintptr_t) * 2; |
| 49 | /* FP to previous frame (X29) */ |
| 50 | frame->fp = ((uintptr_t *)fp)[0]; |
| 51 | /* LR (X30) */ |
| 52 | frame->pc = ((uintptr_t *)fp)[1] - 4; |
| 53 | |
| 54 | return (true); |
| 55 | } |
no test coverage detected