mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
flatpak: add access to host system
THis allows us to get access to the hosts symbol directories, which is necessary for resolving symbols there.
This commit is contained in:
@ -17,6 +17,8 @@
|
||||
"--talk-name=org.gtk.vfs.*",
|
||||
"--system-talk-name=org.freedesktop.PolicyKit1",
|
||||
"--system-talk-name=org.gnome.Sysprof2",
|
||||
"--filesystem=home",
|
||||
"--filesystem=host",
|
||||
"--filesystem=xdg-run/dconf",
|
||||
"--filesystem=~/.config/dconf:ro",
|
||||
"--talk-name=ca.desrt.dconf",
|
||||
|
||||
@ -31,6 +31,20 @@ sp_get_symbol_dirs_locked (void)
|
||||
{
|
||||
sp_symbol_dirs = g_ptr_array_new ();
|
||||
g_ptr_array_add (sp_symbol_dirs, g_strdup ("/usr/lib/debug"));
|
||||
|
||||
/* Add path to host system if we have it */
|
||||
if (g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS))
|
||||
{
|
||||
static gchar *tries[] = {
|
||||
"/var/run/host/usr/lib/debug",
|
||||
};
|
||||
|
||||
for (guint i = 0; i < G_N_ELEMENTS (tries); i++)
|
||||
{
|
||||
if (g_file_test (tries[i], G_FILE_TEST_EXISTS))
|
||||
g_ptr_array_add (sp_symbol_dirs, g_strdup (tries[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return sp_symbol_dirs;
|
||||
|
||||
Reference in New Issue
Block a user