Skip to content
This repository was archived by the owner on Jun 20, 2019. It is now read-only.

Commit 62c3206

Browse files
committed
Support returning stackTop in core.runtime should we be using upstream backtrace implementation
1 parent 7bcc9d4 commit 62c3206

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libphobos/libdruntime/core/runtime.d

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ private
5454

5555
// backtrace
5656
version(GNU)
57+
{
58+
import gcc.builtins;
5759
import gcc.backtrace;
60+
}
5861

5962
version( linux )
6063
import core.sys.linux.execinfo;
@@ -517,6 +520,8 @@ Throwable.TraceInfo defaultTraceHandler( void* ptr = null )
517520
else
518521
version( D_InlineAsm_X86_64 )
519522
asm { naked; mov RAX, RBP; ret; }
523+
else version (GNU)
524+
return cast(void**) __builtin_frame_address(0);
520525
else
521526
return null;
522527
}

0 commit comments

Comments
 (0)