return -1;
target.addr = map__objdump_2mem(map, ops->target.addr);
- if (map_groups__find_ams(&target) == 0 &&
+ if (map_groups__find_ams(map->groups, &target) == 0 &&
map__rip_2objdump(target.map, map->map_ip(target.map, target.addr)) == ops->target.addr)
ops->target.sym = target.sym;
find_target:
target.addr = map__objdump_2mem(map, ops->target.addr);
- if (map_groups__find_ams(&target) == 0 &&
+ if (map_groups__find_ams(map->groups, &target) == 0 &&
map__rip_2objdump(target.map, map->map_ip(target.map, target.addr)) == ops->target.addr)
ops->target.sym = target.sym;
* Actual navigation will come next, with further understanding of how
* the symbol searching and disassembly should be done.
*/
- if (map_groups__find_ams(&target) == 0 &&
+ if (map_groups__find_ams(map->groups, &target) == 0 &&
map__rip_2objdump(target.map, map->map_ip(target.map, target.addr)) == ops->target.addr)
ops->target.sym = target.sym;
.addr = dl->ops.target.addr,
};
- if (!map_groups__find_ams(&target) &&
+ if (!map_groups__find_ams(map->groups, &target) &&
target.sym->start == target.al_addr)
dl->ops.target.sym = target.sym;
}
return maps__find_symbol_by_name(&mg->maps, name, mapp);
}
-int map_groups__find_ams(struct addr_map_symbol *ams)
+int map_groups__find_ams(struct map_groups *mg, struct addr_map_symbol *ams)
{
if (ams->addr < ams->map->start || ams->addr >= ams->map->end) {
- if (ams->map->groups == NULL)
+ if (mg == NULL)
return -1;
- ams->map = map_groups__find(ams->map->groups, ams->addr);
+ ams->map = map_groups__find(mg, ams->addr);
if (ams->map == NULL)
return -1;
}
struct addr_map_symbol;
-int map_groups__find_ams(struct addr_map_symbol *ams);
+int map_groups__find_ams(struct map_groups *mg, struct addr_map_symbol *ams);
int map_groups__fixup_overlappings(struct map_groups *mg, struct map *map, FILE *fp);