24 lines
622 B
C
24 lines
622 B
C
unwind_context_t _eh_elf(unwind_context_t ctx, uintptr_t pc) {
|
|
unwind_context_t out_ctx;
|
|
switch(pc) {
|
|
case 0x615 ... 0x618:
|
|
out_ctx.rsp = ctx.rsp + (8);
|
|
out_ctx.rip = *((uintptr_t*)(out_ctx.rsp + (-8)));
|
|
out_ctx.flags = 3u;
|
|
return out_ctx;
|
|
case 0x619 ... 0x658:
|
|
out_ctx.rsp = ctx.rsp + (48);
|
|
out_ctx.rip = *((uintptr_t*)(out_ctx.rsp + (-8)));
|
|
out_ctx.flags = 3u;
|
|
return out_ctx;
|
|
case 0x659 ... 0x659:
|
|
out_ctx.rsp = ctx.rsp + (8);
|
|
out_ctx.rip = *((uintptr_t*)(out_ctx.rsp + (-8)));
|
|
out_ctx.flags = 3u;
|
|
return out_ctx;
|
|
default:
|
|
out_ctx.flags = 128u;
|
|
return out_ctx;
|
|
}
|
|
}
|