]> Git Repo - linux.git/commitdiff
perf probe: Use dwarf_getcfi_elf() instead of dwarf_getcfi()
authorNamhyung Kim <[email protected]>
Mon, 7 Apr 2014 07:05:48 +0000 (16:05 +0900)
committerJiri Olsa <[email protected]>
Mon, 14 Apr 2014 10:55:40 +0000 (12:55 +0200)
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.

Signed-off-by: Namhyung Kim <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Jiri Olsa <[email protected]>
tools/perf/util/probe-finder.c

index fae274e72fe66168d3882af247fdd2aecc9b1e12..562762117639de758c775123ba4339c77c6dd944 100644 (file)
@@ -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;
This page took 0.059834 seconds and 4 git commands to generate.