aboutsummaryrefslogtreecommitdiffstats
path: root/addr2line.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-20 22:40:21 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-20 22:40:21 +0000
commitb755c26146547995b6b4a7c8a05bbae770af0d6b (patch)
tree0624ea47ef8b942012554345776f4a52d15ee668 /addr2line.c
parent529adb68727c591204d9d41aab513ba06f12f776 (diff)
downloadruby-b755c26146547995b6b4a7c8a05bbae770af0d6b.tar.gz
Show function name based on dladdr
If there's no dwarf and symbol table, this will be a last resort. (mainly on macOS) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'addr2line.c')
-rw-r--r--addr2line.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/addr2line.c b/addr2line.c
index f27efe487c..a11d32b73d 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -2170,6 +2170,8 @@ rb_dump_backtrace_with_lines(int num_traces, void **traces)
path = info.dli_fname;
obj->path = path;
lines[i].path = path;
+ lines[i].sname = info.dli_sname;
+ lines[i].saddr = (uintptr_t)info.dli_saddr;
strlcpy(binary_filename, path, PATH_MAX);
if (fill_lines(num_traces, traces, 1, &obj, lines, i) == (uintptr_t)-1)
break;