Changeset View
Changeset View
Standalone View
Standalone View
head/sys/riscv/riscv/stack_machdep.c
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
static void | static void | ||||
stack_capture(struct thread *td, struct stack *st, struct unwind_state *frame) | stack_capture(struct thread *td, struct stack *st, struct unwind_state *frame) | ||||
{ | { | ||||
stack_zero(st); | stack_zero(st); | ||||
while (1) { | while (1) { | ||||
if (!kstack_contains(td, (vm_offset_t)frame->fp - | if (!unwind_frame(td, frame)) | ||||
(sizeof(uintptr_t) * 2), sizeof(uintptr_t) * 2)) | |||||
break; | break; | ||||
unwind_frame(frame); | |||||
if (!INKERNEL((vm_offset_t)frame->pc)) | if (!INKERNEL((vm_offset_t)frame->pc)) | ||||
break; | break; | ||||
if (stack_put(st, frame->pc) == -1) | if (stack_put(st, frame->pc) == -1) | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
int | int | ||||
Show All 33 Lines |