[gnome-builder/gnome-builder-3-26] sysprof: improve symbol debug dirs for flatpak



commit cd0ebe373304e89c3aa663d04807b85216786b60
Author: Christian Hergert <chergert redhat com>
Date:   Wed Sep 20 21:22:47 2017 -0700

    sysprof: improve symbol debug dirs for flatpak
    
    We need to do a bit more work to try to prime the proper
    symbol directories for Sysprof.

 plugins/flatpak/gbp-flatpak-runtime.c         |    8 ++++----
 plugins/sysprof/gbp-sysprof-workbench-addin.c |    1 +
 2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-runtime.c b/plugins/flatpak/gbp-flatpak-runtime.c
index 4620be6..341b227 100644
--- a/plugins/flatpak/gbp-flatpak-runtime.c
+++ b/plugins/flatpak/gbp-flatpak-runtime.c
@@ -342,9 +342,8 @@ gbp_flatpak_runtime_get_debug_dir (GbpFlatpakRuntime *self)
            */
           deploy_path = g_file_get_path (self->deploy_dir_files);
           path = g_build_filename (deploy_path, "..", "..", "..", "..", "..",
-                                   name, self->arch, self->branch, "active", "files",
+                                   name, self->arch, self->branch, "active", "files", "usr", "lib",
                                    NULL);
-
           if (g_file_test (path, G_FILE_TEST_IS_DIR))
             {
               self->debug_dir = g_steal_pointer (&path);
@@ -388,7 +387,8 @@ gbp_flatpak_runtime_translate_file (IdeRuntime *runtime,
 
   if (debug_dir != NULL)
     {
-      if (g_str_equal (path, "/usr/lib/debug"))
+      if (g_str_equal (path, "/usr/lib/debug") ||
+          g_str_equal (path, "/usr/lib/debug/"))
         return g_file_new_for_path (debug_dir);
 
       if (g_str_has_prefix (path, "/usr/lib/debug/"))
@@ -411,7 +411,7 @@ gbp_flatpak_runtime_translate_file (IdeRuntime *runtime,
   build_dir = get_staging_directory (self);
   app_files_path = g_build_filename (build_dir, "files", NULL);
 
-  if (g_str_equal (path, "/app"))
+  if (g_str_equal (path, "/app") || g_str_equal (path, "/app/"))
     return g_file_new_for_path (app_files_path);
 
   if (g_str_has_prefix (path, "/app/"))
diff --git a/plugins/sysprof/gbp-sysprof-workbench-addin.c b/plugins/sysprof/gbp-sysprof-workbench-addin.c
index 5800e0c..07ebd54 100644
--- a/plugins/sysprof/gbp-sysprof-workbench-addin.c
+++ b/plugins/sysprof/gbp-sysprof-workbench-addin.c
@@ -187,6 +187,7 @@ profiler_run_handler (IdeRunManager *run_manager,
     static const gchar *dirs[] = {
       "/app/lib/debug",
       "/usr/lib/debug",
+      "/app/bin",
       "/app/lib",
       "/usr/lib",
       NULL


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]