From 65a277d71726c9d1aeb9329cfff2776ff103cead Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 21 Mar 2013 15:04:57 +0000 Subject: [PATCH] * addr2line.c (rb_dump_backtrace_with_lines): output line at once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ addr2line.c | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 98c85e0f81..2ec474b9a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Mar 22 00:04:15 2013 NARUSE, Yui + + * addr2line.c (rb_dump_backtrace_with_lines): output line at once. + Thu Mar 21 23:17:08 2013 Nobuyoshi Nakada * thread.c (ruby_kill): get rid of deadlock on signal 0. diff --git a/addr2line.c b/addr2line.c index 04a48e751d..c0fad49885 100644 --- a/addr2line.c +++ b/addr2line.c @@ -619,16 +619,16 @@ rb_dump_backtrace_with_lines(int num_traces, void **trace, char **syms) line_info_t *line = &lines[i]; if (line->line > 0) { - fprintf(stderr, "%s ", syms[i]); if (line->filename) { if (line->dirname && line->dirname[0]) { - fprintf(stderr, "%s/", line->dirname); + fprintf(stderr, "%s %s/%s:%d\n", syms[i], line->dirname, line->filename, line->line); + } + else { + fprintf(stderr, "%s %s:%d\n", syms[i], line->filename, line->line); } - fprintf(stderr, "%s", line->filename); } else { - fprintf(stderr, "???"); + fprintf(stderr, "%s ???:%d\n", syms[i], line->line); } - fprintf(stderr, ":%d\n", line->line); } else { fprintf(stderr, "%s\n", syms[i]); }