Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 4c30649

Browse files
sdmacleajkotas
authored andcommitted
[Arm64] support GBDJIT debug frame (#15174)
1 parent eb0967c commit 4c30649

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/vm/gdbjit.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2413,6 +2413,27 @@ static void BuildDebugFrame(Elf_Builder &elfBuilder, PCODE pCode, TADDR codeSize
24132413
// DW_CFA_def_cfa_register(6)
24142414
0x0d, 0x06,
24152415
};
2416+
#elif defined(_TARGET_ARM64_)
2417+
const unsigned int code_alignment_factor = 1;
2418+
const int data_alignment_factor = -4;
2419+
2420+
UINT8 cieCode[] = {
2421+
// DW_CFA_def_cfa 31(sp), 0
2422+
0x0c, 0x1f, 0x00,
2423+
};
2424+
2425+
UINT8 fdeCode[] = {
2426+
// DW_CFA_advance_loc(1)
2427+
0x02, 0x01,
2428+
// DW_CFA_def_cfa_offset 16
2429+
0x0e, 0x10,
2430+
// DW_CFA_def_cfa_register 29(r29/fp)
2431+
0x0d, 0x1d,
2432+
// DW_CFA_offset: r30 (x30) at cfa-8
2433+
(0x02 << 6) | 0x1e, 0x02,
2434+
// DW_CFA_offset: r29 (x29) at cfa-16
2435+
(0x02 << 6) | 0x1d, 0x04,
2436+
};
24162437
#else
24172438
#error "Unsupported architecture"
24182439
#endif

0 commit comments

Comments
 (0)