summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_dump.c')
-rw-r--r--vm_dump.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vm_dump.c b/vm_dump.c
index 452e307..8adb3f4 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -10,6 +10,7 @@
#include "ruby/ruby.h"
+#include "addr2line.h"
#include "vm_core.h"
#define MAX_POSBUF 128
@@ -788,9 +789,13 @@ rb_vm_bugreport(void)
int i;
if (syms) {
+#ifdef __ELF__
+ rb_dump_backtrace_with_lines(n, trace, syms);
+#else
for (i=0; i<n; i++) {
fprintf(stderr, "%s\n", syms[i]);
}
+#endif
free(syms);
}
#elif defined(_WIN32)