Get backtraces working on AARCH64

This commit is contained in:
Justine Tunney 2023-05-11 22:12:41 -07:00
parent 4edbc98811
commit 285e8a2348
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
2 changed files with 7 additions and 6 deletions

View file

@ -117,10 +117,6 @@ _start:
// this is the first argument to cosmo() below // this is the first argument to cosmo() below
mov x0,sp mov x0,sp
// setup stack frame
mov x29,#0
mov x30,#0
// align stack to GetStackSize() so GetStackAddr() is fast // align stack to GetStackSize() so GetStackAddr() is fast
mov x1,sp mov x1,sp
.weak ape_stack_memsz .weak ape_stack_memsz
@ -129,8 +125,12 @@ _start:
and x1,x2,x1 and x1,x2,x1
mov sp,x1 mov sp,x1
// switch to c start function // setup backtraces
b cosmo mov x29,#0
// switch to c code
bl cosmo
.unreachable
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#else #else

View file

@ -67,6 +67,7 @@ noinstrument noasan int PrintBacktraceUsingSymbols(int fd,
break; break;
} }
addr = frame->addr; addr = frame->addr;
if (!addr) break;
if (addr == (intptr_t)_weaken(__gc)) { if (addr == (intptr_t)_weaken(__gc)) {
do { do {
--gi; --gi;