Merge branch 'fix-yocto-debuglink' into 'master'

Make elf loader search for debug links in .debug dirs

See merge request GNOME/sysprof!140
This commit is contained in:
Christian Hergert
2025-05-16 09:26:48 -07:00

View File

@ -336,6 +336,7 @@ sysprof_elf_loader_annotate (SysprofElfLoader *self,
g_autofree char *directory_name = NULL;
g_autofree char *debug_path = NULL;
g_autofree char *short_debug_path = NULL;
g_autofree char *shorter_debug_path = NULL;
const char *short_directory_name;
const char *debug_dir = self->debug_dirs[i];
const char *build_id;
@ -360,6 +361,12 @@ sysprof_elf_loader_annotate (SysprofElfLoader *self,
sysprof_elf_set_debug_link_elf (elf, get_deepest_debuglink (debug_link_elf));
return;
}
shorter_debug_path = g_build_filename (directory_name, ".debug", debug_link, NULL);
if ((debug_link_elf = sysprof_elf_loader_load (self, mount_namespace, shorter_debug_path, build_id, 0, NULL)))
{
sysprof_elf_set_debug_link_elf (elf, get_deepest_debuglink (debug_link_elf));
return;
}
}
}