mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix remaining unwind values on vm frames
Despite unwind working for vm frames, the change sent before was not fully correct. By analysing the DWARF code with "readelf --debug-dump=frames luajit" I noticed it was not well formated.
This commit is contained in:
parent
13b769e3ad
commit
1401cfb2b3
@ -4390,39 +4390,40 @@ static void emit_asm_debug(BuildCtx *ctx)
|
|||||||
"\t.long 0xffffffff\n" /* CIE_Id */
|
"\t.long 0xffffffff\n" /* CIE_Id */
|
||||||
"\t.byte 0x1\n" /* Version */
|
"\t.byte 0x1\n" /* Version */
|
||||||
"\t.string \"\"\n" /* augmentation */
|
"\t.string \"\"\n" /* augmentation */
|
||||||
"\t.uleb128 0x1\n" /* code_alignment_factor */
|
"\t.uleb128 4\n" /* code_alignment_factor */
|
||||||
"\t.sleb128 -8\n" /* data_alignment_factor */
|
"\t.sleb128 -8\n" /* data_alignment_factor */
|
||||||
"\t.byte 65\n" /* return_address_register (LR) */
|
"\t.byte 65\n" /* return_address_register (LR) */
|
||||||
"\t.byte 0xc\n\t.uleb128 1\n\t.uleb128 %d\n" /* DW_CFA_def_cfa */
|
/* DW_CFA_def_cfa */
|
||||||
"\t.align 2\n"
|
"\t.byte 0xc\n\t.uleb128 1\n\t.uleb128 0\n"
|
||||||
".LECIE0:\n\n",
|
"\t.align 3\n"
|
||||||
CFRAME_SIZE);
|
".LECIE0:\n\n");
|
||||||
fprintf(ctx->fp,
|
fprintf(ctx->fp,
|
||||||
".LSFDE0:\n" /* Frame Description Entry (FDE) */
|
".LSFDE0:\n" /* Frame Description Entry (FDE) */
|
||||||
"\t.long .LEFDE0-.LASFDE0\n" /* length */
|
"\t.long .LEFDE0-.LASFDE0\n" /* length */
|
||||||
".LASFDE0:\n"
|
".LASFDE0:\n"
|
||||||
"\t.long .Lframe0\n" /* CIE_ptr */
|
"\t.long .Lframe0\n" /* CIE_ptr */
|
||||||
"\t.long .Lbegin\n" /* initial_location */
|
"\t.quad .Lbegin\n" /* initial_location */
|
||||||
"\t.long %d\n" /* address_range */
|
"\t.quad %d\n" /* address_range */
|
||||||
"\t.byte 0xe\n\t.uleb128 %d\n" /* DW_CFA_def_cfa_offset */
|
|
||||||
/* DW_CFA_offset_extended_sf (TOC) */
|
|
||||||
"\t.byte 0x11\n\t.uleb128 2\n\t.sleb128 %d\n"
|
|
||||||
|
|
||||||
/* DW_CFA_val_expression of size 9 for LR register */
|
/* DW_CFA_def_cfa_offset */
|
||||||
"\t.byte 0x16\n\t.uleb128 65\n\t.uleb128 9\n"
|
"\t.byte 0xe\n\t.uleb128 %d\n"
|
||||||
"\t.byte 0x70\n\t.uleb128 1\n\t.sleb128 0\n" /* DW_OP_breg */
|
|
||||||
"\t.byte 0x06\n" /* DW_OP_deref */
|
/* DW_CFA_offset_extended_sf $lr */
|
||||||
"\t.byte 0x11\n\t.sleb128 16\n" /* DW_OP_consts */
|
"\t.byte 0x11\n\t.uleb128 65\n\t.sleb128 %d\n"
|
||||||
"\t.byte 0x22\n" /* DW_OP_plus */
|
|
||||||
"\t.byte 0x06\n", /* DW_OP_deref */
|
/* DW_CFA_offset (TOC) */
|
||||||
(int)ctx->codesz, CFRAME_SIZE, 24 / -8);
|
"\t.byte 0x82\n\t.uleb128 %d\n",
|
||||||
|
|
||||||
|
(int)ctx->codesz, CFRAME_SIZE, 16/-8, (24-400)/-8);
|
||||||
for (i = 14; i <= 31; i++)
|
for (i = 14; i <= 31; i++)
|
||||||
fprintf(ctx->fp,
|
fprintf(ctx->fp,
|
||||||
"\t.byte %d\n\t.uleb128 %d\n" /* DW_CFA_offset from r14 to r31 */
|
"\t.byte %d\n\t.uleb128 %d\n" /* DW_CFA_offset from r14 to r31 */
|
||||||
"\t.byte %d\n\t.uleb128 %d\n", /* DW_CFA_offset from f14 to f31 */
|
"\t.byte %d\n\t.uleb128 %d\n", /* DW_CFA_offset from f14 to f31 */
|
||||||
0x80+i, 38+2*(31-i), 0x80+32+i, 2+2*(31-i));
|
// SAVE_GPR_ SAVE_FPR_
|
||||||
|
0x80+i, (112-400)/-8 + 14-i, 0x80+32+i, (256-400)/-8 + 14-i);
|
||||||
|
|
||||||
fprintf(ctx->fp,
|
fprintf(ctx->fp,
|
||||||
"\t.align 2\n"
|
"\t.align 3\n"
|
||||||
".LEFDE0:\n\n");
|
".LEFDE0:\n\n");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user