aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/unwind-libdw.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/unwind-libdw.c')
-rw-r--r--tools/perf/util/unwind-libdw.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/util/unwind-libdw.c b/tools/perf/util/unwind-libdw.c
index 94aa40f6e348..c8cba9d4bfd9 100644
--- a/tools/perf/util/unwind-libdw.c
+++ b/tools/perf/util/unwind-libdw.c
@@ -52,7 +52,7 @@ static int __report_module(struct addr_location *al, u64 ip,
thread__find_symbol(ui->thread, PERF_RECORD_MISC_USER, ip, al);
if (al->map)
- dso = al->map->dso;
+ dso = map__dso(al->map);
if (!dso)
return 0;
@@ -134,17 +134,17 @@ static int access_dso_mem(struct unwind_info *ui, Dwarf_Addr addr,
{
struct addr_location al;
ssize_t size;
+ struct dso *dso;
if (!thread__find_map(ui->thread, PERF_RECORD_MISC_USER, addr, &al)) {
pr_debug("unwind: no map for %lx\n", (unsigned long)addr);
return -1;
}
-
- if (!al.map->dso)
+ dso = map__dso(al.map);
+ if (!dso)
return -1;
- size = dso__data_read_addr(al.map->dso, al.map, ui->machine,
- addr, (u8 *) data, sizeof(*data));
+ size = dso__data_read_addr(dso, al.map, ui->machine, addr, (u8 *) data, sizeof(*data));
return !(size == sizeof(*data));
}