This commit is contained in:
whitequark 2017-02-02 01:08:20 +00:00
parent c2cf60e7f6
commit 0df8a24135

View File

@ -8,16 +8,15 @@
#include <dlfcn.h>
void __artiq_terminate(struct artiq_exception *exn,
uintptr_t *backtrace,
size_t backtrace_size) {
struct slice backtrace) {
printf("Uncaught %s: %s (%"PRIi64", %"PRIi64", %"PRIi64")\n"
"at %s:%"PRIi32":%"PRIi32"\n",
exn->name, exn->message,
exn->param[0], exn->param[1], exn->param[1],
exn->file, exn->line, exn->column + 1);
for(size_t i = 0; i < backtrace_size; i++) {
printf("at %"PRIxPTR"\n", backtrace[i]);
for(size_t i = 0; i < backtrace.len; i++) {
printf("at %"PRIxPTR"\n", ((uintptr_t*)backtrace.ptr)[i]);
}
exit(1);