Skip to content

Commit

Permalink
perf probe: Use dwarf_getcfi_elf() instead of dwarf_getcfi()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
namhyung authored and Jiri Olsa committed Apr 14, 2014
1 parent 182c228 commit 03d8941
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/util/probe-finder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 03d8941

Please sign in to comment.