diff options
author | Namhyung Kim <namhyung@kernel.org> | 2014-04-07 03:05:48 -0400 |
---|---|---|
committer | Jiri Olsa <jolsa@redhat.com> | 2014-04-14 06:55:40 -0400 |
commit | 03d89412981a7681971bc77edba1669595763030 (patch) | |
tree | a153fb1cde9350da10ccf844e292aa9300421478 /tools/perf | |
parent | 182c228ebcf1ac67a44e62236d8f7a8a9a3c5699 (diff) |
perf probe: Use dwarf_getcfi_elf() instead of dwarf_getcfi()
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 <namhyung@kernel.org>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Link: http://lkml.kernel.org/r/1396854348-9296-1-git-send-email-namhyung@kernel.org
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/probe-finder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index fae274e72fe6..562762117639 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, | |||
985 | 985 | ||
986 | #if _ELFUTILS_PREREQ(0, 142) | 986 | #if _ELFUTILS_PREREQ(0, 142) |
987 | /* Get the call frame information from this dwarf */ | 987 | /* Get the call frame information from this dwarf */ |
988 | pf->cfi = dwarf_getcfi(dbg->dbg); | 988 | pf->cfi = dwarf_getcfi_elf(dwarf_getelf(dbg->dbg)); |
989 | #endif | 989 | #endif |
990 | 990 | ||
991 | off = 0; | 991 | off = 0; |