mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
4e21b19a61
commit
940c8b093d
Notes:
git
2022-06-09 20:44:01 +09:00
1 changed files with 7 additions and 5 deletions
12
addr2line.c
12
addr2line.c
|
@ -2329,8 +2329,8 @@ rb_dump_backtrace_with_lines(int num_traces, void **traces)
|
|||
/* if the binary is strip-ed, this may effect */
|
||||
for (p=dladdr_fbases; *p; p++) {
|
||||
if (*p == info.dli_fbase) {
|
||||
lines[i].path = info.dli_fname;
|
||||
lines[i].sname = info.dli_sname;
|
||||
if (info.dli_fname) lines[i].path = info.dli_fname;
|
||||
if (info.dli_sname) lines[i].sname = info.dli_sname;
|
||||
goto next_line;
|
||||
}
|
||||
}
|
||||
|
@ -2340,9 +2340,11 @@ rb_dump_backtrace_with_lines(int num_traces, void **traces)
|
|||
obj->base_addr = (uintptr_t)info.dli_fbase;
|
||||
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;
|
||||
if (path) lines[i].path = path;
|
||||
if (info.dli_sname) {
|
||||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue