diff options
Diffstat (limited to 'src/lj_gdbjit.c')
-rw-r--r-- | src/lj_gdbjit.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lj_gdbjit.c b/src/lj_gdbjit.c index f71b3081..c6e34807 100644 --- a/src/lj_gdbjit.c +++ b/src/lj_gdbjit.c | |||
@@ -528,7 +528,13 @@ static void LJ_FASTCALL gdbjit_ehframe(GDBJITctx *ctx) | |||
528 | DB(DW_CFA_offset|DW_REG_SI); DUV(4); | 528 | DB(DW_CFA_offset|DW_REG_SI); DUV(4); |
529 | DB(DW_CFA_offset|DW_REG_BX); DUV(5); | 529 | DB(DW_CFA_offset|DW_REG_BX); DUV(5); |
530 | #elif LJ_TARGET_X64 | 530 | #elif LJ_TARGET_X64 |
531 | /* Add saved registers for x64 CFRAME. */ | 531 | DB(DW_CFA_offset|DW_REG_BP); DUV(2); |
532 | DB(DW_CFA_offset|DW_REG_BX); DUV(3); | ||
533 | DB(DW_CFA_offset|DW_REG_15); DUV(4); | ||
534 | DB(DW_CFA_offset|DW_REG_14); DUV(5); | ||
535 | /* Extra registers saved for JIT-compiled code. */ | ||
536 | DB(DW_CFA_offset|DW_REG_13); DUV(9); | ||
537 | DB(DW_CFA_offset|DW_REG_12); DUV(10); | ||
532 | #else | 538 | #else |
533 | #error "Unsupported target architecture" | 539 | #error "Unsupported target architecture" |
534 | #endif | 540 | #endif |
@@ -703,8 +709,8 @@ void lj_gdbjit_addtrace(jit_State *J, Trace *T, TraceNo traceno) | |||
703 | ctx.T = T; | 709 | ctx.T = T; |
704 | ctx.mcaddr = (uintptr_t)T->mcode; | 710 | ctx.mcaddr = (uintptr_t)T->mcode; |
705 | ctx.szmcode = T->szmcode; | 711 | ctx.szmcode = T->szmcode; |
706 | ctx.spadjp = CFRAME_SIZE + (MSize)(parent ? J->trace[parent]->spadjust : 0); | 712 | ctx.spadjp = CFRAME_SIZE_JIT + (MSize)(parent?J->trace[parent]->spadjust:0); |
707 | ctx.spadj = CFRAME_SIZE + T->spadjust; | 713 | ctx.spadj = CFRAME_SIZE_JIT + T->spadjust; |
708 | ctx.lineno = proto_line(pt, proto_bcpos(pt, startpc)); | 714 | ctx.lineno = proto_line(pt, proto_bcpos(pt, startpc)); |
709 | ctx.filename = strdata(proto_chunkname(pt)); | 715 | ctx.filename = strdata(proto_chunkname(pt)); |
710 | if (*ctx.filename == '@' || *ctx.filename == '=') | 716 | if (*ctx.filename == '@' || *ctx.filename == '=') |