aboutsummaryrefslogtreecommitdiffstats
path: root/vm_dump.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-18 21:21:02 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-18 21:21:02 +0000
commit0b261c379bddc9772321e1ca2a79e5073b6ee4b5 (patch)
treeb665a5c77cd55e1d125b0f2b0013335b24e1ba39 /vm_dump.c
parente233ca15e02aeae3d6db60421bec5509d65991c6 (diff)
downloadruby-0b261c379bddc9772321e1ca2a79e5073b6ee4b5.tar.gz
* vm_dump: FreeBSD ports' libexecinfo's backtrace(3) can't trace
beyond signal trampoline, and as described in r38342 it can't trace on -O because it see stack frame pointers. libunwind unw_backtrace see dwarf information in the binary and it works with -O (without frame pointers). * configure.in: remove r38342's hack and check libunwind. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 7bb35ea817..f7423031cf 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -431,6 +431,11 @@ rb_vmdebug_thread_dump_state(VALUE self)
# undef HAVE_BACKTRACE
# define HAVE_BACKTRACE 0
#endif
+#if HAVE_LIBUNWIND
+# define HAVE_BACKTRACE 1
+# undef backtrace
+# define backtrace unw_backtrace
+#endif
#if HAVE_BACKTRACE
# include <execinfo.h>
#elif defined(_WIN32)