lkml.org 
[lkml]   [2014]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf probe: Use dwarf_getcfi_elf() instead of dwarf_getcfi()
(2014/04/07 16:05), Namhyung Kim wrote:
> The dwarf_getcfi() only checks .debug_frame section for CFI, but as
> most binaries only have .eh_frame it'd return NULL and it makes
> some variables inaccessible.
>
> Using dwarf_getcfi_elf (along with dwarf_getelf()) allows to show and
> add probe to more variables.
>
> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

Thank you for fixing :)

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

> ---
> tools/perf/util/probe-finder.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
> index 3bf0c8cdccb7..d58da0672736 100644
> --- a/tools/perf/util/probe-finder.c
> +++ b/tools/perf/util/probe-finder.c
> @@ -985,7 +985,7 @@ static int debuginfo__find_probes(struct debuginfo *dbg,
>
> #if _ELFUTILS_PREREQ(0, 142)
> /* Get the call frame information from this dwarf */
> - pf->cfi = dwarf_getcfi(dbg->dbg);
> + pf->cfi = dwarf_getcfi_elf(dwarf_getelf(dbg->dbg));
> #endif
>
> off = 0;
>


--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com




\
 
 \ /
  Last update: 2014-04-08 02:41    [W:0.076 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site