Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1469135
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RFC RESEND] Perf: lookup dwarf unwind stack info in debug file pointed by .gnu_debuglink |
| Date | 2016-08-24 09:40 +0200 |
| Message-ID | <s9AX0-7vG-7@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <s8Zb4-7Xs-23@gated-at.bofh.it> <s9i41-3lu-27@gated-at.bofh.it> <s9i41-3lu-25@gated-at.bofh.it> <s9AX0-7vG-9@gated-at.bofh.it> <s9AX0-7vG-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Aug 23, 2016 at 06:18:10PM +0200, Matija Glavinic Pecotic wrote:
SNIP
> - ret = filename__read_debuglink(filename, debuglink,
> - size - (debuglink - filename));
> + ret = filename__read_debuglink(filename, symfile, PATH_MAX);
> + if (ret)
> + break;
> +
> + /* Check predefined locations where debug file might reside:
> + * - if debuglink is absolute path, check only that one
> + * If debuglink provides name w/o path, look for debug file:
> + * - in the same directory as dso
> + * - in the .debug subdirectory of dso directory
> + * - in the /usr/lib/debug/[dso directory]
> + * */
> + ret = 0;
> + if (symfile[0] == '/') {
> + if (!is_regular_file(symfile))
> + ret = -1;
> + else
> + strncpy(filename, symfile, size);
> + break;
> }
> +
> + snprintf(filename, size, "%s/%s", dso_dir, symfile);
> + if(is_regular_file(filename))
> + break;
> +
> + snprintf(filename, size, "%s/.debug/%s", dso_dir, symfile);
> + if(is_regular_file(filename))
> + break;
> +
> + snprintf(filename, size, "/usr/lib/debug/%s/%s",
> + dso_dir, symfile);
> + if(is_regular_file(filename))
> + break;
it might be more clear to follow the same way we do for vmlinux search,
like array of possible paths and generic code to check.. search for
vmlinux_path in symbol.c
jirka
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH RFC RESEND] Perf: lookup dwarf unwind stack info in debug file pointed by .gnu_debuglink Jiri Olsa <jolsa@redhat.com> - 2016-08-22 17:20 +0200
Re: [PATCH RFC RESEND] Perf: lookup dwarf unwind stack info in debug file pointed by .gnu_debuglink Jiri Olsa <jolsa@redhat.com> - 2016-08-23 13:30 +0200
Re: [PATCH RFC RESEND] Perf: lookup dwarf unwind stack info in debug file pointed by .gnu_debuglink Jiri Olsa <jolsa@redhat.com> - 2016-08-24 09:40 +0200
csiph-web