summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-26 04:30:43 (GMT)
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-26 04:30:43 (GMT)
commit2bf56dededed9d4c376893f783aa5b4300b08495 (patch)
treefed5fd75555a38c1059083fc117d5e801fb02114 /vm_dump.c
parent3935f2ae6e315e4e163e9891fe5d50ae606827ac (diff)
* addr2line.c (fill_lines): loop reverse order not to overwrite
the basis of base addresses comparison. * addr2line.c: use uintptr_t instead of intptr_t for poinrters. * addr2line.c (rb_dump_backtrace_with_lines): don't use syms. * vm_dump.c (rb_print_backtrace): ditto. * addr2line.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_dump.c')
-rw-r--r--vm_dump.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/vm_dump.c b/vm_dump.c
index f2d2c3b..2374bcc 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -683,19 +683,18 @@ rb_print_backtrace(void)
#define MAX_NATIVE_TRACE 1024
static void *trace[MAX_NATIVE_TRACE];
int n = backtrace(trace, MAX_NATIVE_TRACE);
- char **syms = backtrace_symbols(trace, n);
-
- if (syms) {
#ifdef USE_ELF
- rb_dump_backtrace_with_lines(n, trace, syms);
+ rb_dump_backtrace_with_lines(n, trace);
#else
+ char **syms = backtrace_symbols(trace, n);
+ if (syms) {
int i;
for (i=0; i<n; i++) {
fprintf(stderr, "%s\n", syms[i]);
}
-#endif
free(syms);
}
+#endif
#elif defined(_WIN32)
DWORD tid = GetCurrentThreadId();
HANDLE th = (HANDLE)_beginthread(dump_thread, 0, &tid);