Skip to content

Commit 5cd7ade

Browse files
committed
GH-126910 jit_unwind: refactor EH frame generation
1 parent 1efd993 commit 5cd7ade

File tree

4 files changed

+785
-711
lines changed

4 files changed

+785
-711
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#ifndef Py_CORE_JIT_UNWIND_H
2+
#define Py_CORE_JIT_UNWIND_H
3+
4+
#ifdef PY_HAVE_PERF_TRAMPOLINE
5+
6+
#include <stddef.h>
7+
8+
/* Return the size of the generated .eh_frame data for the given encoding. */
9+
size_t _PyJitUnwind_EhFrameSize(int absolute_addr);
10+
11+
/*
12+
* Build DWARF .eh_frame data for JIT code; returns size written or 0 on error.
13+
* absolute_addr selects the FDE address encoding:
14+
* - 0: PC-relative offsets.
15+
* - nonzero: absolute addresses.
16+
*/
17+
size_t _PyJitUnwind_BuildEhFrame(uint8_t *buffer, size_t buffer_size,
18+
const void *code_addr, size_t code_size,
19+
int absolute_addr);
20+
21+
#endif // PY_HAVE_PERF_TRAMPOLINE
22+
23+
#endif // Py_CORE_JIT_UNWIND_H

Makefile.pre.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,7 @@ PYTHON_OBJS= \
510510
Python/suggestions.o \
511511
Python/perf_trampoline.o \
512512
Python/perf_jit_trampoline.o \
513+
Python/jit_unwind.o \
513514
Python/remote_debugging.o \
514515
Python/$(DYNLOADFILE) \
515516
$(LIBOBJS) \

0 commit comments

Comments
 (0)