[gnome-builder] sysprof: remove symbol-dirs integration
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] sysprof: remove symbol-dirs integration
- Date: Sat, 3 Aug 2019 08:05:04 +0000 (UTC)
commit 001022c7b0912eb59198f77658ef69d27cdbd2e4
Author: Christian Hergert <chergert redhat com>
Date: Sat Aug 3 01:03:19 2019 -0700
sysprof: remove symbol-dirs integration
This can be done automatically by sysprof now, so no need to do it here.
src/plugins/sysprof/gbp-sysprof-workspace-addin.c | 65 -----------------------
1 file changed, 65 deletions(-)
---
diff --git a/src/plugins/sysprof/gbp-sysprof-workspace-addin.c
b/src/plugins/sysprof/gbp-sysprof-workspace-addin.c
index 593980a06..1d2619acb 100644
--- a/src/plugins/sysprof/gbp-sysprof-workspace-addin.c
+++ b/src/plugins/sysprof/gbp-sysprof-workspace-addin.c
@@ -44,33 +44,6 @@ static void workspace_addin_iface_init (IdeWorkspaceAddinInterface *iface);
G_DEFINE_TYPE_WITH_CODE (GbpSysprofWorkspaceAddin, gbp_sysprof_workspace_addin, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (IDE_TYPE_WORKSPACE_ADDIN, workspace_addin_iface_init))
-static gchar *
-get_runtime_sysroot (IdeContext *context,
- const gchar *path)
-{
- IdeConfigManager *config_manager;
- IdeConfig *config;
- IdeRuntime *runtime;
-
- g_assert (IDE_IS_MAIN_THREAD ());
- g_assert (IDE_IS_CONTEXT (context));
-
- config_manager = ide_config_manager_from_context (context);
- config = ide_config_manager_get_current (config_manager);
- runtime = ide_config_get_runtime (config);
-
- if (runtime != NULL)
- {
- g_autoptr(GFile) base = g_file_new_for_path (path);
- g_autoptr(GFile) translated = ide_runtime_translate_file (runtime, base);
-
- if (translated != NULL)
- return g_file_get_path (translated);
- }
-
- return NULL;
-}
-
static void
profiler_child_spawned (IdeRunner *runner,
const gchar *identifier,
@@ -147,7 +120,6 @@ profiler_run_handler (IdeRunManager *run_manager,
g_auto(GStrv) argv = NULL;
const gchar * const *env;
IdeEnvironment *ienv;
- IdeContext *context;
g_assert (IDE_IS_MAIN_THREAD ());
g_assert (GBP_IS_SYSPROF_WORKSPACE_ADDIN (self));
@@ -156,43 +128,6 @@ profiler_run_handler (IdeRunManager *run_manager,
sources = g_ptr_array_new ();
- /*
- * First get a copy of the active runtime and find the root of it's
- * translation path. That way we can adjust for the sysroot when
- * resolving symbols.
- *
- * TODO: Hardcoding /usr and /app here sucks, we need a way to have
- * this in the flatpak plugin instead (and associated plumbing
- * to abstract it). We probably should just have a "get_debug_paths"
- * type helper from the runtime.
- */
- {
- /* Put debug directories first so the resolve higher */
- static const gchar *dirs[] = {
- "/app/lib/debug",
- "/usr/lib/debug",
- "/app/bin",
- "/app/lib",
- "/usr/lib",
- NULL
- };
-
- context = ide_object_get_context (IDE_OBJECT (run_manager));
-
- /*
- * TODO: We should really be adding symbol directories to the
- * ELF symbol resolver rather than here.
- */
-
- for (guint i = 0; dirs[i]; i++)
- {
- g_autofree gchar *path = get_runtime_sysroot (context, dirs[i]);
-
- if (path != NULL)
- sysprof_symbol_dirs_add (path);
- }
- }
-
profiler = sysprof_local_profiler_new ();
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]