зеркало из https://github.com/github/ruby.git
Родитель
4e21b19a61
Коммит
940c8b093d
|
@ -2329,8 +2329,8 @@ rb_dump_backtrace_with_lines(int num_traces, void **traces)
|
||||||
/* if the binary is strip-ed, this may effect */
|
/* if the binary is strip-ed, this may effect */
|
||||||
for (p=dladdr_fbases; *p; p++) {
|
for (p=dladdr_fbases; *p; p++) {
|
||||||
if (*p == info.dli_fbase) {
|
if (*p == info.dli_fbase) {
|
||||||
lines[i].path = info.dli_fname;
|
if (info.dli_fname) lines[i].path = info.dli_fname;
|
||||||
lines[i].sname = info.dli_sname;
|
if (info.dli_sname) lines[i].sname = info.dli_sname;
|
||||||
goto next_line;
|
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;
|
obj->base_addr = (uintptr_t)info.dli_fbase;
|
||||||
path = info.dli_fname;
|
path = info.dli_fname;
|
||||||
obj->path = path;
|
obj->path = path;
|
||||||
lines[i].path = path;
|
if (path) lines[i].path = path;
|
||||||
|
if (info.dli_sname) {
|
||||||
lines[i].sname = info.dli_sname;
|
lines[i].sname = info.dli_sname;
|
||||||
lines[i].saddr = (uintptr_t)info.dli_saddr;
|
lines[i].saddr = (uintptr_t)info.dli_saddr;
|
||||||
|
}
|
||||||
strlcpy(binary_filename, path, PATH_MAX);
|
strlcpy(binary_filename, path, PATH_MAX);
|
||||||
if (fill_lines(num_traces, traces, 1, &obj, lines, i) == (uintptr_t)-1)
|
if (fill_lines(num_traces, traces, 1, &obj, lines, i) == (uintptr_t)-1)
|
||||||
break;
|
break;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче