summaryrefslogtreecommitdiff
path: root/addr2line.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-21 15:04:57 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-21 15:04:57 +0000
commit65a277d71726c9d1aeb9329cfff2776ff103cead (patch)
tree9c797797710678f1536b8547d98da8985ac93c16 /addr2line.c
parent035838147231983fb448b84ef5d4d08d4d3bbdf3 (diff)
* 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
Diffstat (limited to 'addr2line.c')
-rw-r--r--addr2line.c10
1 files changed, 5 insertions, 5 deletions
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]);
}