[gnome-builder/gnome-builder-43] plugins/gdb: resolve paths through the IdeConfig
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-43] plugins/gdb: resolve paths through the IdeConfig
- Date: Fri, 30 Sep 2022 00:58:54 +0000 (UTC)
commit ad08a9e26d55d6a18d0d5eeff990f9d2cb2c6b1d
Author: Christian Hergert <chergert redhat com>
Date: Thu Sep 29 17:49:01 2022 -0700
plugins/gdb: resolve paths through the IdeConfig
src/plugins/gdb/gbp-gdb-debugger.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/src/plugins/gdb/gbp-gdb-debugger.c b/src/plugins/gdb/gbp-gdb-debugger.c
index c7d82e1d5..196d4db3a 100644
--- a/src/plugins/gdb/gbp-gdb-debugger.c
+++ b/src/plugins/gdb/gbp-gdb-debugger.c
@@ -46,7 +46,7 @@ struct _GbpGdbDebugger
GCancellable *read_cancellable;
GHashTable *register_names;
GFile *builddir;
- IdeRuntime *current_runtime;
+ IdeConfig *current_config;
struct gdbwire_mi_parser *parser;
@@ -131,12 +131,13 @@ gbp_gdb_debugger_translate_path (GbpGdbDebugger *self,
else
file = g_file_resolve_relative_path (self->builddir, path);
- /* If we still have access to the runtime, translate */
- if (self->current_runtime != NULL)
+ /* If we still have access to the config, translate */
+ if (self->current_config != NULL)
{
- GFile *freeme = file;
- file = ide_runtime_translate_file (self->current_runtime, file);
- g_clear_object (&freeme);
+ g_autoptr(GFile) translated = ide_config_translate_file (self->current_config, file);
+
+ if (translated != NULL)
+ g_set_object (&file, translated);
}
return g_file_get_path (file);
@@ -2470,8 +2471,8 @@ gbp_gdb_debugger_prepare_for_run (IdeDebugger *debugger,
g_assert (IDE_IS_PIPELINE (pipeline));
g_assert (IDE_IS_RUN_CONTEXT (run_context));
- g_set_object (&self->current_runtime,
- ide_pipeline_get_runtime (pipeline));
+ g_set_object (&self->current_config,
+ ide_pipeline_get_config (pipeline));
ide_run_context_push (run_context,
gbp_gdb_debugger_run_context_handler_cb,
g_object_ref (self),
@@ -2554,7 +2555,7 @@ gbp_gdb_debugger_dispose (GObject *object)
g_assert (GBP_IS_GDB_DEBUGGER (self));
- g_clear_object (&self->current_runtime);
+ g_clear_object (&self->current_config);
list = self->cmdqueue.head;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]