forked from M-Labs/artiq
1
0
Fork 0

test: update libartiq_support for changed personality ABI.

This commit is contained in:
whitequark 2016-10-06 15:44:55 +00:00
parent bcdbd00e7b
commit d619336503
1 changed files with 2 additions and 7 deletions

View File

@ -8,7 +8,7 @@
#include <dlfcn.h> #include <dlfcn.h>
void __artiq_terminate(struct artiq_exception *exn, void __artiq_terminate(struct artiq_exception *exn,
struct artiq_backtrace_item *backtrace, uintptr_t *backtrace,
size_t backtrace_size) { size_t backtrace_size) {
printf("Uncaught %s: %s (%"PRIi64", %"PRIi64", %"PRIi64")\n" printf("Uncaught %s: %s (%"PRIi64", %"PRIi64", %"PRIi64")\n"
"at %s:%"PRIi32":%"PRIi32"\n", "at %s:%"PRIi32":%"PRIi32"\n",
@ -17,12 +17,7 @@ void __artiq_terminate(struct artiq_exception *exn,
exn->file, exn->line, exn->column + 1); exn->file, exn->line, exn->column + 1);
for(size_t i = 0; i < backtrace_size; i++) { for(size_t i = 0; i < backtrace_size; i++) {
Dl_info info; printf("at %p\n", backtrace[i]);
if(dladdr((void*) backtrace[i].function, &info) && info.dli_sname) {
printf("at %s+%p\n", info.dli_sname, (void*)backtrace[i].offset);
} else {
printf("at %p+%p\n", (void*)backtrace[i].function, (void*)backtrace[i].offset);
}
} }
exit(1); exit(1);