compilation: pass omit_frame_pointer through to builtin.zig
Renamed dwarf_unwinding -> stack_iterator to better reflect that it's not just DWARF unwinding. Added a test for unwinding with a frame pointer.
This commit is contained in:
22
test/standalone/stack_iterator/shared_lib.c
Normal file
22
test/standalone/stack_iterator/shared_lib.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef LIB_API
|
||||
#define LIB_API
|
||||
#endif
|
||||
|
||||
__attribute__((noinline)) void frame1(
|
||||
void** expected,
|
||||
void** unwound,
|
||||
void (*frame2)(void** expected, void** unwound)) {
|
||||
expected[3] = __builtin_extract_return_addr(__builtin_return_address(0));
|
||||
frame2(expected, unwound);
|
||||
}
|
||||
|
||||
LIB_API void frame0(
|
||||
void** expected,
|
||||
void** unwound,
|
||||
void (*frame2)(void** expected, void** unwound)) {
|
||||
expected[4] = __builtin_extract_return_addr(__builtin_return_address(0));
|
||||
frame1(expected, unwound, frame2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user