File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -511,13 +511,15 @@ rb_vmdebug_thread_dump_state(FILE *errout, VALUE self)
511511# include <sys/mman.h>
512512# undef backtrace
513513
514+ # if defined(__arm64__ )
514515static bool
515516is_coroutine_start (unw_word_t ip )
516517{
517518 struct coroutine_context ;
518519 extern void ruby_coroutine_start (struct coroutine_context * , struct coroutine_context * );
519520 return ((void * )(ip ) == (void * )ruby_coroutine_start );
520521}
522+ # endif
521523
522524int
523525backtrace (void * * trace , int size )
@@ -614,7 +616,7 @@ backtrace(void **trace, int size)
614616 }
615617 return n ;
616618
617- # else /* defined(__arm64__) */
619+ # elif defined(__arm64__ )
618620 /* Since Darwin arm64's _sigtramp is implemented as normal function,
619621 * unwind can unwind frames without special code.
620622 * https://github.com/apple/darwin-libplatform/blob/215b09856ab5765b7462a91be7076183076600df/src/setjmp/generic/sigtramp.c
@@ -631,6 +633,8 @@ backtrace(void **trace, int size)
631633 if (is_coroutine_start (ip )) break ;
632634 }
633635 return n ;
636+ # else
637+ # error unsupported architecture
634638# endif
635639}
636640# elif defined(BROKEN_BACKTRACE )
You can’t perform that action at this time.
0 commit comments