struct rb_node *nd;
size_t ret = fprintf(fp, "dso: %s (", self->short_name);
+ if (self->short_name != self->long_name)
+ ret += fprintf(fp, "%s, ", self->long_name);
+ ret += fprintf(fp, "%s, %sloaded, ", map_type__name[type],
+ self->loaded ? "" : "NOT ");
ret += dso__fprintf_buildid(self, fp);
ret += fprintf(fp, ")\n");
for (nd = rb_first(&self->symbols[type]); nd; nd = rb_next(nd)) {
err = dso__load_sym(self, map, vmlinux, fd, filter, 0);
close(fd);
+ if (err > 0)
+ pr_debug("Using %s for symbols\n", vmlinux);
+
return err;
}
for (i = 0; i < vmlinux_path__nr_entries; ++i) {
err = dso__load_vmlinux(self, map, vmlinux_path[i], filter);
if (err > 0) {
- pr_debug("Using %s for symbols\n", vmlinux_path[i]);
dso__set_long_name(self, strdup(vmlinux_path[i]));
break;
}
if (asprintf(&kallsyms_allocated_filename,
"%s/.debug/[kernel.kallsyms]/%s",
- getenv("HOME"), sbuild_id) == -1)
+ getenv("HOME"), sbuild_id) == -1) {
+ pr_err("Not enough memory for kallsyms file lookup\n");
return -1;
+ }
kallsyms_filename = kallsyms_allocated_filename;
if (access(kallsyms_filename, F_OK)) {
+ pr_err("No kallsyms or vmlinux with build-id %s "
+ "was found\n", sbuild_id);
free(kallsyms_allocated_filename);
return -1;
}
do_kallsyms:
err = dso__load_kallsyms(self, kallsyms_filename, map, filter);
+ if (err > 0)
+ pr_debug("Using %s for symbols\n", kallsyms_filename);
free(kallsyms_allocated_filename);
out_try_fixup: