Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/include/csan.h
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | |||||
kcsan_md_unwind(void) | kcsan_md_unwind(void) | ||||
{ | { | ||||
#ifdef DDB | #ifdef DDB | ||||
c_db_sym_t sym; | c_db_sym_t sym; | ||||
db_expr_t offset; | db_expr_t offset; | ||||
const char *symname; | const char *symname; | ||||
#endif | #endif | ||||
struct unwind_state frame; | struct unwind_state frame; | ||||
uintptr_t sp; | |||||
int nsym; | int nsym; | ||||
__asm __volatile("mov %0, sp" : "=&r" (sp)); | |||||
frame.sp = sp; | |||||
frame.fp = (uintptr_t)__builtin_frame_address(0); | frame.fp = (uintptr_t)__builtin_frame_address(0); | ||||
frame.pc = (uintptr_t)kcsan_md_unwind; | frame.pc = (uintptr_t)kcsan_md_unwind; | ||||
nsym = 0; | nsym = 0; | ||||
while (1) { | while (1) { | ||||
if (!unwind_frame(curthread, &frame)) | if (!unwind_frame(curthread, &frame)) | ||||
break; | break; | ||||
if (!INKERNEL((vm_offset_t)frame.pc)) | if (!INKERNEL((vm_offset_t)frame.pc)) | ||||
Show All 18 Lines |