From 086301ac73c34bc2231f98b67d56b50c65480cc1 Mon Sep 17 00:00:00 2001 From: naruse Date: Fri, 26 Nov 2010 03:28:50 +0000 Subject: * addr2line.c: added to show source filename and line number of functions in backtrace. [ruby-dev:42625] a patch from shinichiro.h * addr2line.h: ditto. * common.mk: add addr2line.$(OBJEXT). * configure.in: check dl_iterate_phdr. * vm_dump.c (rb_vm_bugreport): use rb_dump_backtrace_with_lines in addr2line.c when the binary is ELF. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_dump.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'vm_dump.c') 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