use of com.oracle.truffle.api.TruffleStackTraceElement in project sulong by graalvm.
the class LLVMPrintStackTrace method getStackTrace.
private SulongStackTrace getStackTrace(String message) {
Throwable t = new CThrowable(this, message);
TruffleStackTraceElement.fillIn(t);
List<TruffleStackTraceElement> ctrace = TruffleStackTraceElement.getStackTrace(t);
SulongStackTrace trace = new SulongStackTrace(message);
for (int i = 0; i < ctrace.size(); i++) {
TruffleStackTraceElement element = ctrace.get(i);
// ignore this call
if (element.getLocation() == this) {
assert i == 0;
continue;
}
fillStackTrace(trace, element.getLocation());
}
return trace;
}
Aggregations