Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/arm64/stack_machdep.c
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | stack_save_td(struct stack *st, struct thread *td) | ||||
stack_capture(st, &frame); | stack_capture(st, &frame); | ||||
return (0); | return (0); | ||||
} | } | ||||
void | void | ||||
stack_save(struct stack *st) | stack_save(struct stack *st) | ||||
{ | { | ||||
struct unwind_state frame; | struct unwind_state frame; | ||||
uint64_t sp; | uintptr_t sp; | ||||
__asm __volatile("mov %0, sp" : "=&r" (sp)); | __asm __volatile("mov %0, sp" : "=&r" (sp)); | ||||
frame.sp = sp; | frame.sp = sp; | ||||
frame.fp = (uint64_t)__builtin_frame_address(0); | frame.fp = (uintptr_t)__builtin_frame_address(0); | ||||
frame.pc = (uint64_t)stack_save; | frame.pc = (uintptr_t)stack_save; | ||||
stack_capture(st, &frame); | stack_capture(st, &frame); | ||||
} | } |